diff options
author | Pedro Alves <palves@redhat.com> | 2010-07-21 18:08:27 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-07-21 18:08:27 +0000 |
commit | 23bd0f7c5e23178ccc1c00925813c8e6f17c5eb2 (patch) | |
tree | 4cfdfb22181a0c5593cc9c8bc98338a991cb338a /gdb/testsuite | |
parent | ae30dc00b43017845ab092fd3fbb2004bfb36d63 (diff) | |
download | gdb-23bd0f7c5e23178ccc1c00925813c8e6f17c5eb2.zip gdb-23bd0f7c5e23178ccc1c00925813c8e6f17c5eb2.tar.gz gdb-23bd0f7c5e23178ccc1c00925813c8e6f17c5eb2.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.c | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.exp | 6 |
3 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 178161a..0543f80 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,12 @@ +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. + 2010-07-21 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/fpointer.cc: New test. diff --git a/gdb/testsuite/gdb.base/printcmds.c b/gdb/testsuite/gdb.base/printcmds.c index 8eddeee..2d6668a 100644 --- a/gdb/testsuite/gdb.base/printcmds.c +++ b/gdb/testsuite/gdb.base/printcmds.c @@ -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 () diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index b6a8a3e..11e29fa 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -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 } |