PATCH: Modify the mips gas behavior for -g -O

Daniel Jacobowitz drow@mvista.com
Sun Feb 10 13:56:00 GMT 2002


On Sun, Feb 10, 2002 at 04:34:56PM -0500, Don Bowman wrote:
> 
> >From Daniel Jacobowitz:
> > 
> > But the case H.J. is changing is '-g -O'.  You've got to expect that
> > sort of problem when you compile with optimization.  GCC maintains a
> > strict policy of not changing code generation in response to -g flags;
> > I think gas should do the same.
> 
> Hmmm. Good point. It will make gdb behave badly (ie sometimes the
> 's' command will be the same as the 'c' command :)
> 
> Perhaps the right way is to make the patch, but indicate that user's
> should consider adding -Wa,-g if this is a problem? Then I could
> compile like:
> 
> gcc -g -O2 -Wa,-g
> 
> so that I could still use gdb?
> 
> On a VxWorks platform what will happen is you get a message in the
> shell (vxworks shell) about unable to place breakpoint in delay
> slot, and gdb gets stuck.

Really, GDB should check for this itself.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



More information about the Binutils mailing list