Re: [PATCH/RFC] faster language identification

Jim Blandy
2002-11-13T18:39:48Z

Daniel Jacobowitz <drow@mvista.com> writes:
> > > > I was thinking of what Daniel proposed; a psymtab_language() function. But,
> > > > even in the DWARF case, consider this:
> > > >
> > > > % gcc -Wa,-gdwarf2 bar.s foo.c -o foo
> > > >
> > > > Now, the language should be set to 'asm'? This is what you'll get if you try
> > > > to parse the .debug_info section. Currently, gdb in the above case sets it
> > > > to 'c'.
> > > >
> > > > Also, there is the case that you enable DWARF in both as and gcc, but I think
> > > > this shouldn't be allowed by gcc.
> > >
> > > Well, it _should_ be asm. We don't have line number information for
> > > the .c source. IMHO.
> > >
> > > (Also IMHO, the user just shouldn't do that...)
> >
> > Shouldn't do what? Compile assembly with debug info? Link object
> > modules with a mix of debuggingness? I don't see what's wrong...
>
> No, compile C with assembly debug info, which that command line also
> does. That's the one that'll confuse us.

Ooooh. I see. Yep.