Breakpoints in delay slots

Andrew STUBBS andrew.stubbs@st.com
Fri Oct 20 08:51:00 GMT 2006


In reply to the message from Daniel that I never got, but appears in the 
web archive. (Now that I look I never got my own message back either.)

> This is a remarkable mess.  Unsurprisingly you aren't the first person
> to have this sort of problem, so GDB has a certain amount of support
> for delay slots, but MIPS at least is much friendlier: you can use the
> same breakpoint instruction, and there's a bit in the cause register
> that lets you know you were in a delay slot.
> 
> When you have a symbol file, does that suffice to let you know what
> is code and what is data?

Unfortunately not. At least, the only way I can think of is to check 
whether it has a line number or not, and the answer is that even the 
data has a line number - that of the instruction immediately preceding it.


Andrew



More information about the Gdb mailing list