This is the mail archive of the 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: GDB stub question?

>>>>> "Daniel" == Daniel Jacobowitz <> 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

 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.


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