From: Eli Zaretskii <eliz@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: More problems with language in printing symbols
Date: Sat, 16 May 2009 18:00:00 -0000 [thread overview]
Message-ID: <83ab5dq67f.fsf@gnu.org> (raw)
In-Reply-To: <83d4a9q9e5.fsf@gnu.org>
There's a similar, but different problem with printing symbols in
"maint print symbols". When the program is compiled with COFF debug
info, "maint print symbols" throws an error for some symbols:
Error printing symbol:
internal error - unimplemented function unk_lang_print_type called.
This happens because of this change:
2005-06-03 Joel Brobecker <brobecker@adacore.com>
* symmisc.c (dump_symtab_1): Renamed from dump_symtab.
(dump_symtab): New function.
The new dump_symtab does this:
/* Set the current language to the language of the symtab we're dumping
because certain routines used during dump_symtab() use the current
language to print an image of the symbol. We'll restore it later. */
saved_lang = set_language (symtab->language);
dump_symtab_1 (objfile, symtab, outfile);
set_language (saved_lang);
However, it does not check what is the value of symtab->language. It
so happens that coffread.c creates a symtab for a "_globals_"
pseudo-file, whose symtab gets its language set to language_unknown,
because deduce_language_from_filename does not recognize such a file
name. And, of course, trying to print symbols with language_unknown
as the current language does not give good results...
I'm unsure how best to fix that. We could try recognizing "_globals_"
in deduce_language_from_filename, but what language to use for it? Or
we could add some defensive fallback in dump_symtab which would not
switch the language if it is language_unknown.
Comments? ideas?
next prev parent reply other threads:[~2009-05-16 18:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-16 16:51 [RFA] Fix printing frame arguments for COFF debug info Eli Zaretskii
2009-05-16 18:00 ` Eli Zaretskii [this message]
2009-05-17 16:17 ` [RFA] More problems with language in printing symbols Eli Zaretskii
2009-05-20 23:07 ` Joel Brobecker
2009-05-23 9:26 ` Eli Zaretskii
2009-05-20 23:07 ` [RFA] Fix printing frame arguments for COFF debug info Joel Brobecker
2009-05-21 3:22 ` Eli Zaretskii
2009-05-21 17:05 ` Joel Brobecker
2009-05-23 10:37 ` Eli Zaretskii
2009-05-25 6:29 ` Joel Brobecker
2009-05-25 20:41 ` Eli Zaretskii
2009-05-25 22:55 ` Joel Brobecker
2009-05-29 12:07 ` Eli Zaretskii
2009-05-23 9:33 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83ab5dq67f.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox