c++/24367: Infinite recursion of typedef substitution
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / filename.exp
index ce4935c9361838b6045ecfc8c580164efa28bd84..0713d6f2fcadd50d473dab0bef072e731b17a40b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2013-2015 Free Software Foundation, Inc.
+# Copyright 2013-2019 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ if { [skip_cplus_tests] } { continue }
 
 standard_testfile .cc
 
-if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return -1
 }
 
@@ -26,8 +26,24 @@ if ![runto_main] then {
     continue
 }
 
-gdb_breakpoint [gdb_get_line_number "stop here"]
-gdb_continue_to_breakpoint "stop here"
+gdb_breakpoint [gdb_get_line_number "stop inside C"]
+gdb_continue_to_breakpoint "stop inside C"
 
 gdb_test "print includefile\[0\]" " = 23"
+gdb_test "print this->includefile\[0\]" " = 23"
 gdb_test "print 'includefile'::some_global" " = 27"
+
+gdb_breakpoint [gdb_get_line_number "stop inside D"]
+gdb_continue_to_breakpoint "stop inside D"
+
+gdb_test "print includefile()" " = 24"
+gdb_test "print this->includefile()" " = 24"
+gdb_test "print 'includefile'::some_global" " = 27"
+
+gdb_breakpoint [gdb_get_line_number "stop outside"]
+gdb_continue_to_breakpoint "stop outside"
+
+gdb_test "print c.includefile\[0\]" " = 23"
+gdb_test "print pc->includefile\[0\]" " = 23"
+gdb_test "print d.includefile()" " = 24"
+gdb_test "print pd->includefile()" " = 24"
This page took 0.02561 seconds and 4 git commands to generate.