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]

Re: single stepping mips remote programs built with gcc 4.0


It might be worth pointing out:

> (gdb) step
> Sending packet: $m80001998,4#70...Ack
> Packet received: 27bdffe8
> Sending packet: $M80001998,4:0005000d#43...Ack
> Packet received: OK
> Sending packet: $m800019b0,4#91...Ack
> Packet received: 03e00008
> Sending packet: $M800019b0,4:0005000d#64...Ack
> Packet received: OK
> Sending packet: $s#73...Ack
> Packet received: S05

You've talked about GDB inserting breakpoints for software
single-stepping, but you're not using software single-stepping here. 
Those memory writes are for your user breakpoints at the entry point
and exit point of main.  The 's' packet indicates that the stub itself
is doing the single-stepping.

> Sending packet: $m8000199c,4#9b...Ack
> Packet received: afbf0010
> Sending packet: $m800019a0,4#90...Ack
> Packet received: 0c000664
> Sending packet: $m800019a4,4#94...Ack
> Packet received: 00000000

This is weird.  It looks like GDB is doing some prologue analysis
here, but it's not starting at any function's entry point.  That,
combined with the fact that you said that disassembly shows you the
wrong code, makes me wonder if the debug info is right.

When you say 'print &a' or 'print &main', do you get the right addresses?


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