diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/m-static.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/m-static.exp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp index 45bc090..3d59a48 100644 --- a/gdb/testsuite/gdb.cp/m-static.exp +++ b/gdb/testsuite/gdb.cp/m-static.exp @@ -71,11 +71,18 @@ if { [is_aarch32_target] } { gdb_test "print test5.single_constructor" \ { = {single_constructor \*\(single_constructor \* const\)} 0x[0-9a-f]+ <single_constructor::single_constructor\(\)>} \ "simple object instance, print constructor" - gdb_test "ptype test5.single_constructor" \ - {type = class single_constructor {\r\n public:\r\n single_constructor\(void\);\r\n ~single_constructor\(\);\r\n} \*\(single_constructor \* const\)} \ + + set re \ + [multi_line_string_to_regexp \ + "type = class single_constructor {" \ + "" \ + " public:" \ + " single_constructor(void);" \ + " ~single_constructor(void);" \ + "} *(single_constructor * const)"] + gdb_test "ptype test5.single_constructor" $re \ "simple object instance, ptype constructor" - gdb_test "ptype single_constructor::single_constructor" \ - {type = class single_constructor {\r\n public:\r\n single_constructor\(void\);\r\n ~single_constructor\(\);\r\n} \*\(single_constructor \* const\)} \ + gdb_test "ptype single_constructor::single_constructor" $re \ "simple object class, ptype constructor" gdb_test "print test1.~gnu_obj_1" \ @@ -168,12 +175,12 @@ if {[test_compiler_info {gcc-[0-3]-*}] # and DW_AT_MIPS_linkage_name = _ZN9gnu_obj_47nowhereE . setup_xfail *-*-* } -gdb_test "print test4.nowhere" "<optimized out>" "static const int initialized nowhere (print field)" +gdb_test "print test4.nowhere" "<optimized out>" "static const int initialized nowhere, print field" gdb_test "ptype test4.nowhere" "type = const int" gdb_test "print test4.nowhere.nowhere" "Attempt to extract a component of a value that is not a structure." # Same, but print the whole struct. -gdb_test "print test4" "static nowhere = <optimized out>.*" "static const int initialized nowhere (whole struct)" +gdb_test "print test4" "static nowhere = <optimized out>.*" "static const int initialized nowhere, whole struct" # static const initialized in the class definition, PR gdb/11702. if { $non_dwarf } { setup_xfail *-*-* } |