This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB stub question?
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
>> Is there any way we could revert back to the old way (i.e) - set
>> breakpoint at the next address - continue - remove breakpoint.
Daniel> GDB has never done this to implement source single stepping,
Daniel> so I don't know what you want. You can't predict the next
Daniel> address that far ahead; what if the current line contains a
Daniel> branch?
Isn't there a "target side single step" optional packet -- so if the
stub supports that then gdb can just say "stepi" rather than the more
laborious process of setting one or two breakpoints and doing a
continue?
Daniel> You might want to look at the T packet response if you aren't
Daniel> already using it; supplying a few registers there can make
Daniel> stepping much faster.
I did that with our MIPS target -- yes it helps a lot. I think you
need SP and (if relevant on the target) FP, and maybe PC. A good way
to tell whether it's right is to see if gdb still asks for registers
after it gets the T packet. If yes, then one of the registers it
wanted immediately wasn't in the T packet.
paul