This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: single stepping mips remote programs built with gcc 4.0
- From: Jim Blandy <jimb at red-bean dot com>
- To: "Newman, Sarah R" <sarah dot r dot newman at lmco dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, gdb at sources dot redhat dot com
- Date: Tue, 22 Nov 2005 16:20:42 -0800
- Subject: Re: single stepping mips remote programs built with gcc 4.0
- References: <5990BE666D0436419054489CDD9D505409EE88F5@emss01m10.us.lmco.com>
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?