diff options
author | Tom Tromey <tromey@redhat.com> | 2009-03-31 20:21:08 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-03-31 20:21:08 +0000 |
commit | 71c25deab3d61e4cfbaffc7006704a27d1bc0737 (patch) | |
tree | 197ec5630b7db57b6f8d1cf23309bed4047417c2 /gdb/testsuite | |
parent | 45ac276db3f6ee73f955254e5ef055c673b5fbb3 (diff) | |
download | gdb-71c25deab3d61e4cfbaffc7006704a27d1bc0737.zip gdb-71c25deab3d61e4cfbaffc7006704a27d1bc0737.tar.gz gdb-71c25deab3d61e4cfbaffc7006704a27d1bc0737.tar.bz2 |
gdb
2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
Keith Seitz <keiths@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
PR gdb/6817
* Makefile.in (dbxread.o): Update.
* dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
* dwarf2read.c (GDB_FORM_cached_string): New.
(read_partial_die): Use dwarf2_canonicalize_name.
(dwarf2_linkage_name): Use dwarf2_name.
(dwarf2_canonicalize_name): New.
(dwarf2_name): Use dwarf2_canonicalize_name.
(dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
* stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
* symtab.c (lookup_symbol_in_language): Canonicalize input before
searching.
* cp-name-parser.y: operator() requires two parameters,
according to libiberty.
* minsyms.c (lookup_minimal_symbol): Canonicalize input
before searching.
* NEWS: Update.
gdb/testsuite
2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
PR gdb/931
* gdb.cp/gdb1355.exp (f_li, f_lui, f_si, f_sui): Allow canonical
output.
* gdb.cp/templates.exp: Allow canonical output. Remove KFAILs
for gdb/931.
* dw2-strp.S (DW_AT_language): Change to C++.
(DW_TAG_variable (name ""), Abbrev code 7, .Lemptyname): New.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/gdb1355.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/templates.exp | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-strp.S | 18 |
4 files changed, 39 insertions, 16 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cf1378f..016bf54 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2009-03-31 Daniel Jacobowitz <dan@codesourcery.com> + Jan Kratochvil <jan.kratochvil@redhat.com> + + PR gdb/931 + * gdb.cp/gdb1355.exp (f_li, f_lui, f_si, f_sui): Allow canonical + output. + * gdb.cp/templates.exp: Allow canonical output. Remove KFAILs + for gdb/931. + * dw2-strp.S (DW_AT_language): Change to C++. + (DW_TAG_variable (name ""), Abbrev code 7, .Lemptyname): New. + 2009-03-31 Joel Brobecker <brobecker@adacore.com> * gdb.ada/tasks: New testcase. diff --git a/gdb/testsuite/gdb.cp/gdb1355.exp b/gdb/testsuite/gdb.cp/gdb1355.exp index 77687a6..8028bce 100644 --- a/gdb/testsuite/gdb.cp/gdb1355.exp +++ b/gdb/testsuite/gdb.cp/gdb1355.exp @@ -68,11 +68,11 @@ set s_tail ".*" set f_i "${ws}int m_int;" set f_c "${ws}char m_char;" -set f_li "${ws}long int m_long_int;" +set f_li "${ws}long( int)? m_long_int;" set f_ui "${ws}unsigned int m_unsigned_int;" -set f_lui "${ws}long unsigned int m_long_unsigned_int;" -set f_si "${ws}short int m_short_int;" -set f_sui "${ws}short unsigned int m_short_unsigned_int;" +set f_lui "${ws}(long unsigned int|unsigned long) m_long_unsigned_int;" +set f_si "${ws}short( int)? m_short_int;" +set f_sui "${ws}(short unsigned int|unsigned short) m_short_unsigned_int;" set f_uc "${ws}unsigned char m_unsigned_char;" set f_f "${ws}float m_float;" set f_d "${ws}double m_double;" diff --git a/gdb/testsuite/gdb.cp/templates.exp b/gdb/testsuite/gdb.cp/templates.exp index cd9b770..f49caff 100644 --- a/gdb/testsuite/gdb.cp/templates.exp +++ b/gdb/testsuite/gdb.cp/templates.exp @@ -329,13 +329,11 @@ gdb_expect { send_gdb "print Foo<volatile char *>::foo\n" gdb_expect { - -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" } + -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<(volatile char|char volatile) ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" } -re "No symbol \"Foo<volatile char \\*>\" in current context.\r\n$gdb_prompt $" { - # This used to be a kfail gdb/33. That problem has been - # fixed, but now gdb/931 and gdb/1512 are rearing their ugly - # heads. - kfail "gdb/931" "print Foo<volatile char *>::foo" + # This used to be a kfail gdb/33 and then kfail gdb/931. + fail "print Foo<volatile char *>::foo" } -re "$gdb_prompt $" { fail "print Foo<volatile char *>::foo" } timeout { fail "(timeout) print Foo<volatile char *>::foo" } @@ -343,13 +341,11 @@ gdb_expect { send_gdb "print Foo<volatile char*>::foo\n" gdb_expect { - -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" } + -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<(volatile char|char volatile) ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" } -re "No symbol \"Foo<volatile char\\*>\" in current context.\r\n$gdb_prompt $" { - # This used to be a kfail gdb/33. That problem has been - # fixed, but now gdb/931 and gdb/1512 are rearing their ugly - # heads. - kfail "gdb/931" "print Foo<volatile char*>::foo" + # This used to be a kfail gdb/33 and then kfail gdb/931. + fail "print Foo<volatile char*>::foo" } -re "$gdb_prompt $" { fail "print Foo<volatile char*>::foo" } timeout { fail "(timeout) print Foo<volatile char*>::foo" } @@ -459,7 +455,7 @@ send_gdb "ptype quxint\n" gdb_expect { -re "type = class Qux<int, ?& ?string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } -re "type = class Qux<int, ?& ?string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } - -re "type = class Qux<int, ?\\(char ?\\*\\)\\(& ?string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } + -re "type = class Qux<int, ?\\(char ?\\*\\)\\(& ?\\(?string\\)?\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" } -re "type = class Qux<int, ?& ?\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int qux\\(int, int\\);.*\r\n\\}\r\n$gdb_prompt $" { kfail "gdb/1512" "ptype quxint" } diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.S b/gdb/testsuite/gdb.dwarf2/dw2-strp.S index a1602a5..293cc1b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-strp.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.S @@ -28,7 +28,8 @@ /* CU die */ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */ .4byte .Lproducer /* DW_AT_producer */ - .byte 1 /* DW_AT_language (C) */ + /* Use C++ to exploit a bug in parsing DW_AT_name "". */ + .byte 4 /* DW_AT_language (C++) - */ .Larray_type: .uleb128 2 /* Abbrev: DW_TAG_array_type */ @@ -60,6 +61,10 @@ .Lconst_type: .uleb128 6 /* Abbrev: DW_TAG_const_type */ .4byte .Larray_type-.Lcu1_begin/* DW_AT_type */ + + .uleb128 7 /* Abbrev: DW_TAG_variable (name "") */ + .4byte .Lemptyname /* DW_AT_name */ + .byte 0 /* End of children of CU */ .Lcu1_end: @@ -126,6 +131,15 @@ .uleb128 0x13 /* DW_FORM_ref4 */ .byte 0x0 /* Terminator */ .byte 0x0 /* Terminator */ + + .uleb128 7 /* Abbrev code */ + .uleb128 0x34 /* DW_TAG_variable */ + .byte 0x0 /* DW_children_no */ + .uleb128 0x3 /* DW_AT_name */ + .uleb128 0xe /* DW_FORM_strp */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ /* String table */ @@ -140,3 +154,5 @@ .string "a_string" .Lvarcontents: .string "hello world!\n" +.Lemptyname: + .string "" |