This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC/RFA] Set current language when dumping symtab
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 28 May 2005 19:49:05 -0400
- Subject: Re: [RFC/RFA] Set current language when dumping symtab
- References: <20050504001955.GE2439@adacore.com>
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