This is the mail archive of the
mailing list for the GDB project.
Re: gdb/1473: calling functions in a statically linked binary fails
- From: Paul Brook <paul at codesourcery dot com>
- To: gdb-gnats at sources dot redhat dot com, wim dot yedema at philips dot com,gdb-prs at sources dot redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 17 Dec 2003 23:22:08 +0000
- Subject: Re: gdb/1473: calling functions in a statically linked binary fails
- Organization: CodeSourcery
Patch below fixed PR gdb/1473.
What was happening is the breakpoint for the end of a hand-called function is
set to the same location as the breakpoint for monitoring shared library
activity. However, when the breakpoint is hit gdb sees the shlib breakpoint
and resumes execution.
Patch below fixes this by checking it we've hit a dummy call return breakpoint
before resuming execition. The case of an normal breakpoint and shlib
breakpoint at the same location still doesn't work, but that's less critical.
2003-12-17 Paul Brook <email@example.com>
* infrun.c (keep_going): Check stop_stack_dummy.
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.122
diff -u -p -r1.122 infrun.c
--- gdb/infrun.c 25 Nov 2003 16:01:36 -0000 1.122
+++ gdb/infrun.c 17 Dec 2003 22:37:44 -0000
@@ -2876,6 +2876,14 @@ stop_stepping (struct execution_control_
keep_going (struct execution_control_state *ecs)
+ /* If we've hit a dummy stack breakpoint then stop,
+ even though we would normally keep going. */
+ if (stop_stack_dummy)
+ stop_stepping (ecs);
/* Save the pc before execution, to compare with pc after stop. */
prev_pc = read_pc (); /* Might have been DECR_AFTER_BREAK */