This is the mail archive of the gdb@sourceware.org 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: Breakpoints in delay slots


On Thu, 2006-10-19 at 10:52 +0100, Andrew STUBBS wrote:
> Michael Snyder wrote:
> > Sorry to be terse, but...
> > 
> > (1) -O0
> 
> Actually it can still happen that the first instruction in a line is the 
> nop in the delay slot, but that can be considered a compiler bug.
> 
> > (2) "Don't do that".
> 
> That's hardly the developer's choice.
> 
> In the real world people sometimes have to debug optimised code and 
> "don't do it" is not a useful answer.

Well, I know, but in some cases it's the only answer we have.
There are some problems in debugging optimized code that are
not soluble, or not practically soluble.

Moreover, I separated (1) from (2) deliberately.  In the absence
of the compiler placing a delay slot at the beginning of a function
or line, for the user to explicitly place a breakpoint in a delay
slot can arguably be called pilot error.



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