From: msnyder Date: Thu, 18 Jun 2009 23:41:26 +0000 (+0000) Subject: 2009-06-18 Hui Zhu X-Git-Tag: cgen-snapshot-20091101~2043 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7084bfe3769751a5b25566508e06912b2d75a69a;p=pf3gnuchains%2Fpf3gnuchains4x.git 2009-06-18 Hui Zhu Michael Snyder * infrun.c (handle_inferior_event): Improve reverse stepping through function epilogue. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 352deeb328..0d5e763163 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-06-18 Hui Zhu + Michael Snyder + + * infrun.c (handle_inferior_event): Improve reverse stepping + through function epilogue. + 2009-06-18 Paul Pluzhnikov * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for diff --git a/gdb/infrun.c b/gdb/infrun.c index 3eaf89e1b6..7488912c06 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3630,9 +3630,17 @@ infrun: not switching back to stepped thread, it has vanished\n"); Note that step_range_end is the address of the first instruction beyond the step range, and NOT the address of the last instruction - within it! */ + within it! + + Note also that during reverse execution, we may be stepping + through a function epilogue and therefore must detect when + the current-frame changes in the middle of a line. */ + if (stop_pc >= ecs->event_thread->step_range_start - && stop_pc < ecs->event_thread->step_range_end) + && stop_pc < ecs->event_thread->step_range_end + && (execution_direction != EXEC_REVERSE + || frame_id_eq (get_frame_id (get_current_frame ()), + ecs->event_thread->step_frame_id))) { if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: stepping inside range [0x%s-0x%s]\n",