This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Breakpoint function address
- From: "Spen" <spen at spen-soft dot co dot uk>
- To: <gdb at sources dot redhat dot com>
- Date: Tue, 21 Aug 2007 15:01:34 +0100
- Subject: Breakpoint function address
- Authenticated-sender:
Hi,
I have just updated to using gdb 6.6 from 6.5 (actually using insight).
Part of my startup script is to set a breakpoint @ main: thb main
This has been fine under 6.5 but seems to have broken under 6.6 (also tried
cvs head).
The problem occurs if I link with the gc-sections option, removing this
option the breakpoints are set correctly.
With gc-secions
thb main will set the breakpoint @ 0x00000004
gdb 6.6 (gdb head does not) reports the following when loading the file:
misplaced first line number at 0x48 for 'VICITCmd'
Without gc-sections
thb main set to 0x0000028c as expected.
print main produces (with/without gc-sections).
$1 = {int (void)} 0x27c <main>
My target is remote arm-elf (using openocd) running under cygwin.
The same problem occurs if building under gcc 3.4.6 or 4.2.
Any help would be greatly appreciated.
Cheers
Spen