aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2009-06-18 23:55:57 +0000
committerMichael Snyder <msnyder@vmware.com>2009-06-18 23:55:57 +0000
commit6373d119691aac21d145d937cf6aa2a167893743 (patch)
treeddd2a4a5697bd18f914902d8134813b6fb9cf799 /gdb/infrun.c
parent31410e843b46ef8df6b73f3b19cab434ef157680 (diff)
downloadgdb-6373d119691aac21d145d937cf6aa2a167893743.zip
gdb-6373d119691aac21d145d937cf6aa2a167893743.tar.gz
gdb-6373d119691aac21d145d937cf6aa2a167893743.tar.bz2
2009-06-14 Hui Zhu <teawater@gmail.com>
Michael Snyder <msnyder@vmware.com> * infrun.c (handle_inferior_event): Reverse-next through trampoline.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 7488912..e9d870d 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3777,10 +3777,21 @@ infrun: not switching back to stepped thread, it has vanished\n");
keep_going (ecs);
return;
}
- /* Normal (staticly linked) function call return. */
- init_sal (&sr_sal);
- sr_sal.pc = ecs->stop_func_start;
- insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
+ if (gdbarch_skip_trampoline_code(current_gdbarch,
+ get_current_frame (),
+ stop_pc))
+ {
+ /* We are in a function call trampoline.
+ Keep stepping backward to get to the caller. */
+ ecs->event_thread->stepping_over_breakpoint = 1;
+ }
+ else
+ {
+ /* Normal function call return (static or dynamic). */
+ init_sal (&sr_sal);
+ sr_sal.pc = ecs->stop_func_start;
+ insert_step_resume_breakpoint_at_sal (sr_sal, null_frame_id);
+ }
}
else
insert_step_resume_breakpoint_at_caller (frame);