From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC][gdb] Use partial symbol table to find language for main
Date: Tue, 03 Mar 2020 15:48:00 -0000 [thread overview]
Message-ID: <87tv35cucl.fsf@tromey.com> (raw)
In-Reply-To: <20200301231752.GA6202@delia> (Tom de Vries's message of "Mon, 2 Mar 2020 00:17:54 +0100")
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> Ideally, we'd like to get the language of the symbol without triggering
Tom> expansion into a full symtab, and get the speedup without having to set the
Tom> language manually.
This seems like a good idea.
Tom> +extern enum language
Tom> +find_psym_language (block_enum block_index, const char *name,
Tom> + const domain_enum domain);
FYI we don't normally line break after the type for declarations, only
definitions.
Tom> /* The languages above didn't identify the name of the main procedure.
Tom> Fallback to "main". */
Tom> +
Tom> + /* Try to find language for main in psymtabs. */
Tom> + enum language lang = find_psym_language (GLOBAL_BLOCK, "main", VAR_DOMAIN);
Generic code shouldn't call directly into the psymtab code. While most
debug readers create psymtabs, they aren't required to. For example,
the DWARF index code bypasses psymtabs entirely -- but this call might
cause the DWARF reader to create psymtabs in this case.
Instead the way to do this is add a new function pointer to
struct quick_symbol_functions, then implement it in the various debug
readers.
Tom
next prev parent reply other threads:[~2020-03-03 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-01 23:18 Tom de Vries
2020-03-03 15:48 ` Tom Tromey [this message]
2020-03-04 16:07 ` Tom de Vries
2020-03-13 13:59 ` Tom Tromey
2020-03-17 15:25 ` [PATCH][gdb] " Tom de Vries
2020-03-30 21:20 ` [PING][PATCH][gdb] " Tom de Vries
2020-04-01 20:07 ` [PATCH][gdb] " Tom Tromey
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=87tv35cucl.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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