On 9/2/06, Kevin D. Kissell <KevinK@mips.com> wrote:
As Alan indicted, mechanisms for emulating single step
behavior have long existed for MIPS and Linux. Newer
MIPS parts which implement the EJTAG debug system
do have a single-step mode, but they trap to Debug mode,
rather than to the kernel - this allows kernel code to be
single-stepped using an EJTAG probe. If the system
allows for it - one needs to have ROM at the right location
which transfers Debug mode control back to the kernel - it
is possible to exploit EJTAG debug features from an OS
kernel. We''ve prototyped this to prove that it works, but
never went so far as to wire up EJTAG signle-step mode
to a ptrace or other debug API. If for some strange reason
the standard emulation mechanism isn't adequate for you
(e.g. if your applicaiton is executing out of ROM), you
do have this as a potential alternative. But it would not
be a trivial hack.
Well this is ok ..but I am trying to implement kenel debugger..
something like system tap.
And I have started with kprobe..
where the kernel code execution will be stopped at user specified
address using break, how do i single step that instruction to decode
the instruction and print the registers value..?