This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Patch to fix reverse return from subroutine error


Hui Zhu wrote:
Hi,

This patch is to fix bug in http://sourceware.org/ml/gdb/2009-06/msg00089.html

2009-06-11 Hui Zhu <teawater@gmail.com>

	* infrun.c (handle_inferior_event): Reverse return from
	subroutine doesn't use code "infrun: stepped into subroutine".

Hi Hui,


This patch is approved, if you'll make the changes shown below.


------------------------------------------------------------------------

---
 infrun.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/infrun.c
+++ b/infrun.c
@@ -3708,7 +3708,12 @@ infrun: not switching back to stepped th
 		    ecs->event_thread->step_frame_id)
       && (frame_id_eq (frame_unwind_id (get_current_frame ()),
 		       ecs->event_thread->step_frame_id)
-	  || execution_direction == EXEC_REVERSE))
+	  || (execution_direction == EXEC_REVERSE
+	      && ecs->event_thread->step_frame_id.stack_addr_p
+	      && get_frame_id (get_current_frame ()).stack_addr_p

Replace "get_current_frame ()" with "frame".


+ && !gdbarch_inner_than (current_gdbarch,

Replace "current_gdbarch" with "gdbarch".


+				      ecs->event_thread->step_frame_id.stack_addr,
+				      get_frame_id (get_current_frame()).stack_addr))))

Replace "get_current_frame()" with "frame".


{
CORE_ADDR real_stop_pc;

Thanks, Michael


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]