Line number weirdness (arm-none-eabi-gdb)

Tom Tromey
Tue Dec 1 19:42:00 GMT 2009

>>>>> "Andrew" == Queisser, Andrew <> writes:

Andrew> I'm confused about the behavior of my arm-none-eabi-gdb. The
Andrew> snippet below shows that when I "p" the version of a symbol I
Andrew> get one value and GDB apparently doesn't know the line number
Andrew> information for that symbol. When I set a breakpoint on that
Andrew> symbol GDB tells me that it set the breakpoint at a location a
Andrew> little farther than the nominal value for that symbol (0x2b842
Andrew> vs. 0x2b830).

I don't know why the "list" part does not work.  Maybe it is a bug, it
is hard to say without more information.

I believe the discrepancy between "break" and "print" is because "break"
puts a breakpoint on the first source line of the function -- which
occurs after the function prologue.  If you really want a breakpoint at
the entry point, you can use "break *function".  Usually you want the
default behavior here, though.


More information about the Gdb mailing list