Re: [PATCH/RFC] faster language identification

Daniel Jacobowitz
2002-11-07T19:33:19Z

On Thu, Nov 07, 2002 at 10:46:22PM +0200, Elias Athanasopoulos wrote:
> Hi all,
>
> DWARFx encodes the language. In such a case, I think it is more
> reliable to get the language from the object, instead of looking at the
> source files' extensions.
>
> Comments?

Please don't. See:

/* Set the initial language.

A better solution would be to record the language in the psymtab when reading
partial symbols, and then use it (if known) to set the language. This would
be a win for formats that encode the language in an easily discoverable place,
such as DWARF. For stabs, we can jump through hoops looking for specially
named symbols or try to intuit the language from the specific type of stabs
we find, but we can't do that until later when we read in full symbols.
FIXME. */

static void
set_initial_language (void)

Either that or there should be a psymtab_language() method somewhere.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer