From: dje@google.com (Doug Evans)
To: gdb@sourceware.org
Subject: Why are DW_TAG_{typedef,base_type,subrange_type} in static symbol list?
Date: Thu, 17 Nov 2011 18:48:00 -0000 [thread overview]
Message-ID: <20111117184756.D69C12461AD@ruffy.mtv.corp.google.com> (raw)
Hi.
Does anyone understand why this code in dwarf2read.c adds typedefs,
base_type, subrange_type to objfile->static_psymbols and not
objfile->global_psymbols?
At least for c++ wouldn't a better location be global_psymbols?
[Similarly to how DW_TAG_{class,structure,...} types are handled?]
add_partial_symbol:
case DW_TAG_typedef:
case DW_TAG_base_type:
case DW_TAG_subrange_type:
add_psymbol_to_list (actual_name, strlen (actual_name),
built_actual_name,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
0, (CORE_ADDR) 0, cu->language, objfile);
break;
vs:
case DW_TAG_class_type:
[...]
add_psymbol_to_list (actual_name, strlen (actual_name),
built_actual_name,
STRUCT_DOMAIN, LOC_TYPEDEF,
(cu->language == language_cplus
|| cu->language == language_java)
? &objfile->global_psymbols
: &objfile->static_psymbols,
0, (CORE_ADDR) 0, cu->language, objfile);
And similarly in new_symbol_full:
[these two cases should at least be combined]
case DW_TAG_typedef:
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
list_to_add = cu->list_in_scope;
break;
case DW_TAG_base_type:
case DW_TAG_subrange_type:
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
list_to_add = cu->list_in_scope;
break;
vs:
case DW_TAG_class_type:
[...]
list_to_add = (cu->list_in_scope == &file_symbols
&& (cu->language == language_cplus
|| cu->language == language_java)
? &global_symbols : cu->list_in_scope);
reply other threads:[~2011-11-17 18:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20111117184756.D69C12461AD@ruffy.mtv.corp.google.com \
--to=dje@google.com \
--cc=gdb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).