recent MIPS mdebug-related changes cause gcc testsuite failures.
Daniel Jacobowitz
drow@mvista.com
Fri Jun 21 12:24:00 GMT 2002
On Fri, Jun 21, 2002 at 12:19:08PM -0700, cgd@broadcom.com wrote:
> At Fri, 21 Jun 2002 14:54:19 -0400, Daniel Jacobowitz wrote:
> > That's what I meant (well, should have meant at least) by the second
> > half. Telling the assembler -g is wrong too, for non-assembly source.
>
> But... how do you distinguish asm vs. non-asm source?
>
> i mean, if you say:
>
> mips-elf-gcc -gcoff foo.S
>
> i believe the intended effect is, after preprocessing, to run the
> assembler with flags that include "-g" and now "-mdebug", right?
>
> in this case, you _do_ want assembler debugging info, right?
Precisely.
> I.e., I don't think it's Right to get rid of most of the
> SUBTARGET_ASM_DEBUGGING_SPEC contents...
Look at ASM_DEBUG_SPEC in gcc.c. We need to extend it for MIPS to
mention "-g -mdebug". Or perhaps "--gcoff -mdebug" and add that, but
that's for later. I'm not even sure that "-g -mdebug" will work - I
know that it hasn't in the past.
> > Fixing this is a little hard, because it requires actually checking for
> > the (recent, GAS only) -mdebug option. You should probably add a
> > configure check for it rather than trying to key it off MASK_GAS, since
> > mips-elf doesn't even default to GAS. Just copy the check for
> > --gstabs in configure.in and pick an appropriate version number (maybe
> > --2.13).
> >
> > Then you do:
> >
> > #if HAVE_AS_MDEBUG_DEBUG_FLAG
> > #define SUBTARGET_ASM_DEBUGGING_SPEC "%{gcoff* -mdebug}"
> > #else
> > ...
> > #endif
> >
> > ASM_DEBUG_SPEC needs to be adjusted also, probably, to pass -mdebug;
> > but that's not important.
>
> Uh... I don't see an ASM_DEBUG_SPEC...
In the body of gcc.c. It is used for .S and .s, but not for .c* files.
Only Solaris overrides it at present.
> Personally, I'd think that handling -mdebug (${mdebug} would belong in
> SUBTARGET_ASM_DEBUGGING_SPEC along with the rest, since it _is_ an
> assembler debugging flag...
No, it's an assembler flag. Which means it should go in
SUBTARGET_ASM_DEBUGGING_SPEC, yes. -g and --gdwarf2 are assembler
DEBUGGING flags, and they should be in ASM_DEBUG_SPEC.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
More information about the Binutils
mailing list