From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Doug Evans'" <dje@google.com>
Cc: "'Pedro Alves'" <pedro@codesourcery.com>, <gdb-patches@sourceware.org>
Subject: RE: [RFA]dwarf reader: Avoid complaint on const type
Date: Tue, 29 Jun 2010 13:09:00 -0000 [thread overview]
Message-ID: <002401cb178c$57428a70$05c79f50$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <AANLkTinrrd1jraPF95BXqQpKMke-s30gRnLBNspl3kMB@mail.gmail.com>
I agree with Doug's analysis that new_symbol
should never be called for those dwarf tags.
The most logical seems to just revert the addition of
of the two tags, which would lead to a complaint if
new_symbol would be called for those tags,
as it did before my original patch.
As Doug explained, this should not happen anymore
as new_symbol is only called from process_die
and the first part of the patch removes this call for
DW_TAG_const_type and DW_TAG_volatile_type.
Tested on x86_64 linux machine from GCC compiler farm,
nothing related to the patch seemed to appear.
(sigaltstack.exp showed failures but I don't think this is related).
Pierre
2010-06-29 Pierre Muller <muller@ics.u-strasbg.fr>
Doug Evans <dje@google.com>
* dwarf2read.c (process_die): Only call read_type_die function for
const and volatile modifiers.
(new_symbol): Revert change adding a new type for DW_TAG_const_type
or DW_TAG_volatile_type tag if it has a name attribute.
Index: src/gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.406
diff -u -p -r1.406 dwarf2read.c
--- src/gdb/dwarf2read.c 28 Jun 2010 22:03:31 -0000 1.406
+++ src/gdb/dwarf2read.c 29 Jun 2010 12:31:55 -0000
@@ -3220,12 +3220,15 @@ process_die (struct die_info *die, struc
case DW_TAG_base_type:
case DW_TAG_subrange_type:
case DW_TAG_typedef:
- case DW_TAG_const_type:
- case DW_TAG_volatile_type:
/* Add a typedef symbol for the type definition, if it has a
DW_AT_name. */
new_symbol (die, read_type_die (die, cu), cu);
break;
+ /* Type modifiers should be accepted without creating a new type
name. */
+ case DW_TAG_const_type:
+ case DW_TAG_volatile_type:
+ read_type_die (die, cu);
+ break;
case DW_TAG_common_block:
read_common_block (die, cu);
break;
@@ -8987,9 +8990,7 @@ new_symbol (struct die_info *die, struct
add_symbol_to_list (sym, cu->list_in_scope);
break;
case DW_TAG_base_type:
- case DW_TAG_subrange_type:
- case DW_TAG_const_type:
- case DW_TAG_volatile_type:
+ case DW_TAG_subrange_type:
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
add_symbol_to_list (sym, cu->list_in_scope);
next prev parent reply other threads:[~2010-06-29 13:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <41597.7287375883$1274454923@news.gmane.org>
2010-05-21 17:20 ` Tom Tromey
2010-05-21 20:46 ` Pierre Muller
2010-06-16 16:08 ` Pedro Alves
2010-06-20 22:39 ` Pierre Muller
[not found] ` <3752333521215815628@unknownmsgid>
2010-06-28 20:27 ` Doug Evans
2010-06-29 13:09 ` Pierre Muller [this message]
2010-07-01 17:09 ` Pedro Alves
2010-07-01 17:13 ` Joel Brobecker
2010-07-21 17:16 ` Pedro Alves
[not found] ` <29342.6726283089$1277816998@news.gmane.org>
2010-07-02 21:47 ` Tom Tromey
2010-05-21 15:31 Pierre Muller
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='002401cb178c$57428a70$05c79f50$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).