This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Modify the mips gas behavior for -g -O
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Don Bowman <don at sandvine dot com>
- Cc: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>,"'hjl at lucon dot org'" <hjl at lucon dot org>
- Date: Sun, 10 Feb 2002 16:49:53 -0500
- Subject: Re: PATCH: Modify the mips gas behavior for -g -O
- References: <FE045D4D9F7AED4CBFF1B3B813C85337675B4F@mail.sandvine.com>
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