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: Don Bowman <don at sandvine dot com>
- To: 'Daniel Jacobowitz' <drow at mvista dot com>, 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:34:56 -0500
- Subject: RE: PATCH: Modify the mips gas behavior for -g -O
>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.
--don