diff options
author | Michael Snyder <msnyder@vmware.com> | 2009-06-18 23:41:27 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2009-06-18 23:41:27 +0000 |
commit | 31410e843b46ef8df6b73f3b19cab434ef157680 (patch) | |
tree | e6f95e1dadcb71a089f0f7183c8490ba43c5ea89 /gdb/infrun.c | |
parent | 20764115b017633eed88557e285959cda7126994 (diff) | |
download | gdb-31410e843b46ef8df6b73f3b19cab434ef157680.zip gdb-31410e843b46ef8df6b73f3b19cab434ef157680.tar.gz gdb-31410e843b46ef8df6b73f3b19cab434ef157680.tar.bz2 |
2009-06-18 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com>
* infrun.c (handle_inferior_event): Improve reverse stepping
through function epilogue.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 3eaf89e..7488912 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", |