From: Pedro Alves <pedro@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,
"'Doug Evans'" <dje@google.com>,
gdb-patches@sourceware.org
Subject: Re: [RFA]dwarf reader: Avoid complaint on const type
Date: Wed, 21 Jul 2010 17:16:00 -0000 [thread overview]
Message-ID: <201007211816.42456.pedro@codesourcery.com> (raw)
In-Reply-To: <20100701171256.GW2595@adacore.com>
Since a month has passed and this hasn't been fully resolved
yet, I'm reverting the original patch, and adding a test
independent of sigaltstack.exp covering the problem. I also
filed PR11827 for the problem, just so I could add a pointer in
the testcase.
I'll apply this to both the 7.2 branch and mainline in a bit.
--
Pedro Alves
gdb/
2010-07-21 Pedro Alves <pedro@codesourcery.com>
PR symtab/11827
Revert:
2010-05-21 Pierre Muller <muller@ics.u-strasbg.fr>
* dwarf2read.c (process_die): Also allow DW_TAG_const_type
and DW_TAG_volatile_type.
(new_symbol): Likewise.
gdb/testsuite/
2010-07-21 Pedro Alves <pedro@codesourcery.com>
PR symtab/11827
* gdb.base/printcmds.c (enum some_volatile_enum): New enum.
(some_volatile_enum): New variable.
* gdb.base/printcmds.exp (test_print_enums): New.
<top level>: Call it.
---
gdb/dwarf2read.c | 4 ----
gdb/testsuite/gdb.base/printcmds.c | 6 ++++++
gdb/testsuite/gdb.base/printcmds.exp | 6 ++++++
3 files changed, 12 insertions(+), 4 deletions(-)
Index: src/gdb/testsuite/gdb.base/printcmds.c
===================================================================
--- src.orig/gdb/testsuite/gdb.base/printcmds.c 2010-07-21 18:03:30.000000000 +0100
+++ src/gdb/testsuite/gdb.base/printcmds.c 2010-07-21 18:05:08.000000000 +0100
@@ -90,6 +90,12 @@ struct some_arrays {
struct some_arrays *parrays = &arrays;
+enum some_volatile_enum { enumvolval1, enumvolval2 };
+
+/* A volatile enum variable whose name is the same as the enumeration
+ name. See PR11827. */
+volatile enum some_volatile_enum some_volatile_enum = enumvolval1;
+
/* -- */
int main ()
Index: src/gdb/testsuite/gdb.base/printcmds.exp
===================================================================
--- src.orig/gdb/testsuite/gdb.base/printcmds.exp 2010-07-21 18:03:30.000000000 +0100
+++ src/gdb/testsuite/gdb.base/printcmds.exp 2010-07-21 18:05:37.000000000 +0100
@@ -671,6 +671,11 @@ proc test_print_array_constants {} {
gdb_test "print *&{4,5,6}\[1\]" "Attempt to take address of value not located in memory."
}
+proc test_print_enums {} {
+ # Regression test for PR11827.
+ gdb_test "print some_volatile_enum" "enumvolval1"
+}
+
proc test_printf {} {
gdb_test "printf \"x=%d,y=%d,z=%d\\n\", 5, 6, 7" "x=5,y=6,z=7"
gdb_test "printf \"string=%.4sxx\\n\", teststring" "string=testxx"
@@ -800,6 +805,7 @@ if [set_lang_c] then {
# We used to do the runto main here.
test_print_string_constants
test_print_array_constants
+ test_print_enums
test_printf
test_printf_with_dfp
}
Index: src/gdb/dwarf2read.c
===================================================================
--- src.orig/gdb/dwarf2read.c 2010-07-21 18:06:55.000000000 +0100
+++ src/gdb/dwarf2read.c 2010-07-21 18:07:10.000000000 +0100
@@ -4192,8 +4192,6 @@ 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);
@@ -10001,8 +9999,6 @@ new_symbol (struct die_info *die, struct
break;
case DW_TAG_base_type:
case DW_TAG_subrange_type:
- case DW_TAG_const_type:
- case DW_TAG_volatile_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-07-21 17:16 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
2010-07-01 17:09 ` Pedro Alves
2010-07-01 17:13 ` Joel Brobecker
2010-07-21 17:16 ` Pedro Alves [this message]
[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=201007211816.42456.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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