On Tue, May 16, 2000 at 10:49:08AM -0700, Jun Sun wrote:
> However, step or next or setting another breakpoint do not work. It
> appears that gdbserver calls ptrace with PTRACE_SINGLESTEP option, which
> is not implemented in the kernel I am using (it is v2.3.99-pre3). Is
> this implemented in the latest version? If not, is it difficult to add
> one? Or can we get around without it?
PTRACE_SINGLESTEP is meant to be implemented using hardware single stepping.
That's something which most MIPS CPUs don't support. It can be simulated in
userspace, so there is no point in putting it into the kernel ergo we won't
There's actually a good number of CPUs which don't have hardware breakpoints
so you should check what gdbserver does for those other architectures.
The generic solution is to write a breakpoint into the logically next
instruction(s). Usually that's at epc + 4 but there are branch instructions
to make live more entertaining ...