This is the mail archive of the gdb-prs@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: breakpoints/2331: gdb cannot break on entry point forstatically linked binaries


The following reply was made to PR breakpoints/2331; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@false.org>
To: Philipp Kohlbecher <xt28@gmx.de>
Cc: gdb-gnats@sources.redhat.com
Subject: Re: breakpoints/2331: gdb cannot break on entry point for
	statically linked binaries
Date: Fri, 12 Oct 2007 08:57:02 -0400

 On Fri, Oct 12, 2007 at 02:42:03PM +0200, Philipp Kohlbecher wrote:
 > I am not sure if that is the issue. Even if the program is running and
 > jumps back to its entry point, a breakpoint will not stop execution.
 
 Interesting.  Thank you for the excellent test case.  This particular
 one is a little atypical; there is no "main" and no "_dl_debug_state"
 so _start is used for the shared library event breakpoint.  GDB does
 not correctly detect a second breakpoint at the same location.
 
 (gdb) set debug infrun 1
 (gdb) run
 ...
 Hello, World!
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x8048074
 infrun: BPSTAT_WHAT_CHECK_SHLIBS
 infrun: no stepping, continue
 infrun: resume (step=1, signal=0)
 infrun: prepare_to_wait
 infrun: infwait_normal_state
 infrun: TARGET_WAITKIND_STOPPED
 infrun: stop_pc = 0x8048079
 infrun: trap expected
 infrun: no stepping, continue
 infrun: resume (step=0, signal=0)
 infrun: prepare_to_wait
 Hello, World!
 
 At the shared library breakpoint we should detect another present
 breakpoint and stop.  This may be hard to fix :-(  I'm not going to
 work on it right now, but hopefully my explanation will help if
 someone else tackles it.
 
 -- 
 Daniel Jacobowitz
 CodeSourcery


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