aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-08-21 18:57:34 +0000
committerDaniel Jacobowitz <drow@false.org>2008-08-21 18:57:34 +0000
commit0114d6026069970886e2f3ccc1290fbee9f52a8a (patch)
treea9d6efa44aab676b6dd862fa94d17e511b190788 /gdb/testsuite
parentdf8a16a1ee1a3d464ecffd6ad66a1d2e09d47838 (diff)
downloadgdb-0114d6026069970886e2f3ccc1290fbee9f52a8a.zip
gdb-0114d6026069970886e2f3ccc1290fbee9f52a8a.tar.gz
gdb-0114d6026069970886e2f3ccc1290fbee9f52a8a.tar.bz2
* dwarf2read.c (processing_current_prefix): Delete static
variable. (process_full_comp_unit): Do not set processing_current_prefix. (dwarf2_full_name): New function. (read_func_scope): Do not set processing_current_prefix. Use determine_prefix. (read_structure_type): Do not set processing_current_prefix. Remove unused inner cleanup. (process_structure_scope): Do not set processing_current_prefix. (read_enumeration_type): Use dwarf2_full_name. (determine_class_name): Return a const char *. Put the result on the objfile obstack. Use dwarf2_full_name. (read_namespace_type): New function. (read_namespace): Do not create the type here. Use determine_prefix. (read_typedef): Use dwarf2_full_name. Do not pass the name to init_type. (read_base_type): Do not pass the name to init_type. Handle TYPE_FLAG_NOSIGN. (read_unspecified_type): Do not pass the name to init_type. (new_symbol): Use dwarf2_full_name instead of processing_current_prefix. (read_type_die): Do not set processing_current_prefix. Handle DW_TAG_namespace. (determine_prefix): Handle specifications. Return the result on the objfile obstack. Handle unions correctly.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.cp/classes.exp17
1 files changed, 10 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.cp/classes.exp b/gdb/testsuite/gdb.cp/classes.exp
index 096d2b4..fdf6c3e 100644
--- a/gdb/testsuite/gdb.cp/classes.exp
+++ b/gdb/testsuite/gdb.cp/classes.exp
@@ -394,8 +394,11 @@ proc test_enums {} {
# print the object
+ # We match the enum values with and without qualifiers. As of
+ # 2008-08-21 we can output the qualifiers for DWARF-2.
+
gdb_test "print obj_with_enum" \
- "\\$\[0-9\]+ = \{priv_enum = red, x = 0\}" \
+ "\\$\[0-9\]+ = \{priv_enum = (ClassWithEnum::)?red, x = 0\}" \
"print obj_with_enum (1)"
# advance one line
@@ -405,20 +408,20 @@ proc test_enums {} {
# print the object again
gdb_test "print obj_with_enum" \
- "\\$\[0-9\]+ = \{priv_enum = green, x = 0\}" \
+ "\\$\[0-9\]+ = \{priv_enum = (ClassWithEnum::)?green, x = 0\}" \
"print obj_with_enum (2)"
# print the enum member
- gdb_test "print obj_with_enum.priv_enum" "\\$\[0-9\]+ = green"
+ gdb_test "print obj_with_enum.priv_enum" "\\$\[0-9\]+ = (ClassWithEnum::)?green"
# ptype on the enum member
gdb_test_multiple "ptype obj_with_enum.priv_enum" "ptype obj_with_enum.priv_enum" {
- -re "type = enum ClassWithEnum::PrivEnum \{ ?red, green, blue, yellow = 42 ?\}$nl$gdb_prompt $" {
+ -re "type = enum ClassWithEnum::PrivEnum \{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" {
pass "ptype obj_with_enum.priv_enum"
}
- -re "type = enum PrivEnum \{ ?red, green, blue, yellow = 42 ?\}$nl$gdb_prompt $" {
+ -re "type = enum PrivEnum \{ ?(ClassWithEnum::)?red, (ClassWithEnum::)?green, (ClassWithEnum::)?blue, (ClassWithEnum::)?yellow = 42 ?\}$nl$gdb_prompt $" {
# gcc 2.95.3 -gdwarf-2
# gcc 3.3.2 -gdwarf-2
pass "ptype obj_with_enum.priv_enum"
@@ -468,7 +471,7 @@ proc test_enums {} {
# See PR gdb/1588.
gdb_test_multiple "print (ClassWithEnum::PrivEnum) 42" "print (ClassWithEnum::PrivEnum) 42" {
- -re "\\$\[0-9\]+ = yellow$nl$gdb_prompt $" {
+ -re "\\$\[0-9\]+ = (ClassWithEnum::)?yellow$nl$gdb_prompt $" {
pass "print (ClassWithEnum::PrivEnum) 42"
}
-re "A (parse|syntax) error in expression, near `42'.$nl$gdb_prompt $" {
@@ -479,7 +482,7 @@ proc test_enums {} {
}
gdb_test_multiple "print ('ClassWithEnum::PrivEnum') 42" "print ('ClassWithEnum::PrivEnum') 42" {
- -re "\\$\[0-9\]+ = yellow$nl$gdb_prompt $" {
+ -re "\\$\[0-9\]+ = (ClassWithEnum::)?yellow$nl$gdb_prompt $" {
# gcc 3.3.2 -gstabs+
# gcc HEAD 2003-12-28 21:08:30 UTC -gstabs+
pass "print ('ClassWithEnum::PrivEnum') 42"