* MIPS stub problem
@ 2008-09-16 16:32 Qiu Feng
2008-09-16 18:35 ` Michael Snyder
0 siblings, 1 reply; 2+ messages in thread
From: Qiu Feng @ 2008-09-16 16:32 UTC (permalink / raw)
To: gdb
Hi all,
I am implementing a stub for mips. I found epc always contains the position
of next instuction after the inserted "break", I wonder if PC client gdb
will take it into acount? Should I manually rollback the epc to the location
of replaced original instruction?
Another question, does pc side GDB only read local varibles by offset of SP
(should be $29)?
Best regards
Michael Qiu
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: MIPS stub problem
2008-09-16 16:32 MIPS stub problem Qiu Feng
@ 2008-09-16 18:35 ` Michael Snyder
0 siblings, 0 replies; 2+ messages in thread
From: Michael Snyder @ 2008-09-16 18:35 UTC (permalink / raw)
To: Qiu Feng; +Cc: gdb
Qiu Feng wrote:
> Hi all,
>
> I am implementing a stub for mips. I found epc always contains the position
> of next instuction after the inserted "break", I wonder if PC client gdb
> will take it into acount? Should I manually rollback the epc to the location
> of replaced original instruction?
Hmmm. I'm rusty here, but I don't think that's the norm
for MIPS. What exact mips part is this?
There are two classes of processors -- those which point
to the trap instruction itself after taking a trap, and those
that point to the next instruction following the trap insn.
GDB accounts for this difference with a configuration variable
called DECR_PC_AFTER_BREAK ("decrement the PC after a breakpoint").
It's true for i386, for instance, but not normally for mips.
> Another question, does pc side GDB only read local varibles by offset of SP
> (should be $29)?
Again, my MIPS foo is rusty, but its likely that gdb may
also read local variables by offset from a frame pointer reg.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-16 18:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-16 16:32 MIPS stub problem Qiu Feng
2008-09-16 18:35 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox