From: Jim Blandy <jimb@redhat.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com, ezannoni@redhat.com
Subject: Re: [RFA/dwarf] Partial DIE support for specifications
Date: Thu, 15 Apr 2004 07:31:00 -0000 [thread overview]
Message-ID: <vt2isg14s4e.fsf@zenia.home> (raw)
In-Reply-To: <20040402204733.GA16725@nevyn.them.org>
Overall, I think it makes the partial symbol processing much more
legible. It's much easier to follow the flow of things. It's a shame
about the speed hit, but I think we just have to take that for now.
So once the points below are addressed or answered, I think it can go
in.
- In fixup_partial_die, in the last 'if', you check for
DW_TAG_structure_type twice. And shouldn't that same 'if' make sure
part_die->name is NULL before calling guess_structure_name?
And some trivial comments:
- Could the 'make_cleanup (free_stack_comp_unit, &cu)' call be moved
to directly after the call to 'obstack_init (&cu.comp_unit_obstack)'?
- The comment atop 'scan_partial_symbols' says "Read in all interesting
dies". But it doesn't do that any more.
- Why not write the body of scan_partial_symbols like this? It seems
clearer to me, but if you don't agree, then don't bother:
/* Namespaces have interesting children, anonymous or not. */
if (pdi->tag == DW_TAG_namespace)
add_partial_namespace (pdi, lowpc, highpc, cu);
/* Enums have interesting children, anonymous or not. */
else if (pdi->tag == DW_TAG_enumeration_type)
{
if (!pdi->is_declaration)
add_partial_enumeration (pdi, cu);
}
/* Everything else is only interesting if it has a name. */
else if (pdi->name != NULL)
{
switch (pdi->tag)
{
case DW_TAG_subprogram:
if (pdi->has_pc_info)
{
if (pdi->lowpc < *lowpc)
{
*lowpc = pdi->lowpc;
}
if (pdi->highpc > *highpc)
{
*highpc = pdi->highpc;
}
if (!pdi->is_declaration)
{
add_partial_symbol (pdi, cu);
}
}
break;
case DW_TAG_variable:
case DW_TAG_typedef:
case DW_TAG_union_type:
if (!pdi->is_declaration)
{
add_partial_symbol (pdi, cu);
}
break;
case DW_TAG_class_type:
case DW_TAG_structure_type:
if (!pdi->is_declaration)
{
add_partial_symbol (pdi, cu);
}
break;
case DW_TAG_base_type:
case DW_TAG_subrange_type:
/* File scope base type definitions are added to the partial
symbol table. */
add_partial_symbol (pdi, cu);
break;
default:
break;
}
}
next prev parent reply other threads:[~2004-04-15 7:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-02 20:47 Daniel Jacobowitz
2004-04-12 21:14 ` Daniel Jacobowitz
2004-04-15 7:31 ` Jim Blandy [this message]
2004-04-16 15:18 ` Daniel Jacobowitz
2004-04-16 21:30 ` Jim Blandy
2004-04-03 16:33 r6144
2004-04-03 22:17 ` Daniel Jacobowitz
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=vt2isg14s4e.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=drow@false.org \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/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