This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/RFA] Set current language when dumping symtab


On Tue, May 03, 2005 at 05:19:55PM -0700, Joel Brobecker wrote:
> Hello,
> 
> One of our users tried to use the "maint print symbols syms" command
> to dump all the symbols in a text format, and that caused a crash on
> x86-windows. The reason for the crash is that dump_symtab() indirectly
> uses the current language vector to analyze the symbols and then do
> the printing. The symtab language may be different from the current
> language, so the current language needs to be temporarily adjusted
> during the printing. This is what the attached patch does.
> 
> 2005-05-02  Joel Brobecker  <brobecker@adacore.com>
> 
>         * symmisc.c (dump_symtab_1): Renamed from dump_symtab.
>         (dump_symtab): New function.
>         * Makefile.in (symmisc.o): Add dependency on ui-out.h.

What's the new dependency on ui-out.h for?  I didn't see anything
obvious in the patch.

Also, what crashes?  i.e. why specifically is it harmful to have the
wrong language set?

Also, I am not convinced that the new TRY_CATCH is necessary.  The
only bit likely to throw is print_symbol, which is already wrapped in
catch_errors.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]