print_symbol_info patch for source code not current language

Michael Snyder msnyder@cygnus.com
Fri Oct 29 13:08:00 GMT 1999


Jim Blandy wrote:
> 
> >   Shouldn't we use the language of source if known at least if
> > the current language mode is auto ??
> >
> >   This short patch to symtab.c solve this problem
> 
> This looks good!
> 
> However, saving, setting, and restoring the current language is
> somewhat messy.  Note that the definition of type_print just calls
> LA_PRINT_TYPE, which calls current_language->la_print_type.  Your code
> could simply determine the appropriate language, L, and then call
> L->la_print_type directly, instead of print_type.

Sounds like a good idea.

> I don't know if it is possible for symbols to have language_auto as
> their language.  It is probably best to handle that case somehow, even
> if it never arises.

How about if "language_auto" symbols default
to current_language (as all symbols currently do)?

				Michael


More information about the Gdb-patches mailing list