This is the mail archive of the gdb@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]

Breakpoint function address


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


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