]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite/
authorNathan Sidwell <nathan@codesourcery.com>
Fri, 9 Jun 2006 20:11:08 +0000 (20:11 +0000)
committerNathan Sidwell <nathan@codesourcery.com>
Fri, 9 Jun 2006 20:11:08 +0000 (20:11 +0000)
* gdb.cp/anon-union.cc: Add code at end of function.
* gdb.cp/anon-union.exp: Adjust end of function breakpoint.
* gdb.mi/var-cmd.c: Add code at end of function.
* gdb.mi/mi-var-display.exp: Adjust end of next.
* gdb.mi/mi2-var-display.exp: Likewise.

ChangeLog.csl
gdb/testsuite/gdb.cp/anon-union.cc
gdb/testsuite/gdb.cp/anon-union.exp
gdb/testsuite/gdb.mi/mi-var-display.exp
gdb/testsuite/gdb.mi/mi2-var-display.exp
gdb/testsuite/gdb.mi/var-cmd.c

index ce94383132dd99ee6676b1fbc3b646917d66fe87..95c26490dd65a253c8a137e9186c4e51919c9cd1 100644 (file)
@@ -1,5 +1,12 @@
 2006-06-09  Nathan Sidwell  <nathan@codesourcery.com>
 
+       gdb/testsuite/
+       * gdb.cp/anon-union.cc: Add code at end of function.
+       * gdb.cp/anon-union.exp: Adjust end of function breakpoint.
+       * gdb.mi/var-cmd.c: Add code at end of function.
+       * gdb.mi/mi-var-display.exp: Adjust end of next.
+       * gdb.mi/mi2-var-display.exp: Likewise.
+
        gdb/testsuite/
        * gdb.base/break.c: Add breakpoint 10a marker.
        * gdb.base/break.exp: Check breakpoint on }
index 0b3fd130aebb144e8860eb50d64a79be974bfffc..fa75251778ad7dbe7a760dc078a78b56edd2401f 100644 (file)
@@ -52,4 +52,5 @@ int main()
 
   w = 45;
 
+  int j = 0;
 }
index 4c34dcfcd90c8fae7958351ff98f23de27741832..c63cfafd8b5df8f4c81b1c229895a25751237598 100644 (file)
@@ -288,7 +288,7 @@ gdb_expect {
 # Step over next assignment to w
 send_gdb "next\n"
 gdb_expect {
-   -re "55\[ \t\]*\}\r\n$gdb_prompt $" {
+    -re "55\[ \t\]*int j = 0;\r\n$gdb_prompt $" {
       pass "next 4"
     }
     -re ".*$gdb_prompt $" { fail "next 4" }
index 45471f7dcb0c67877384848218df0b54d833b991..2e107bd8a336333d8ee4bdc09e483c3dbb6d4453 100644 (file)
@@ -40,16 +40,16 @@ mi_delete_breakpoints
 mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load ${binfile}
 
-set line_dct_close_brace [expr [gdb_get_line_number "snp2.long_ptr = &z3;"] + 1]
+set line_dct_end [gdb_get_line_number "{int a = 0;}"]
 
-mi_gdb_test "200-break-insert $line_dct_close_brace" \
-       "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_close_brace\",times=\"0\"\}" \
+mi_gdb_test "200-break-insert $srcfile:$line_dct_end" \
+       "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_end\",times=\"0\"\}" \
        "break-insert operation"
 
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_dct_close_brace\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_dct_end\"\}\r\n$mi_gdb_prompt$" {
        pass "run to do_children_tests"
     }
     -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
index 5ad4731edaed8fdc879e8b2c50ffae359c692b17..e8201d5d2dbf320570487250d6d3a8a09d2d658b 100644 (file)
@@ -40,16 +40,16 @@ mi_delete_breakpoints
 mi_gdb_reinitialize_dir $srcdir/$subdir
 mi_gdb_load ${binfile}
 
-set line_dct_close_brace [expr [gdb_get_line_number "snp2.long_ptr = &z3;"] + 1]
+set line_dct_end [gdb_get_line_number "{int a = 0;}"]
 
-mi_gdb_test "200-break-insert $line_dct_close_brace" \
-       "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_close_brace\",times=\"0\"\}" \
+mi_gdb_test "200-break-insert $srcfile:$line_dct_end" \
+       "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"$line_dct_end\",times=\"0\"\}" \
        "break-insert operation"
 
 mi_run_cmd
 # The running part has been checked already by mi_run_cmd
 gdb_expect {
-    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dct_close_brace\"\}\r\n$mi_gdb_prompt$" {
+    -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dct_end\"\}\r\n$mi_gdb_prompt$" {
        pass "run to do_children_tests"
     }
     -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
index 2a297d2c02d755bbab1273546caf4c30d9aa28e2..e7daeacea89a6690973ad38a2ca938637fdd4131 100644 (file)
@@ -278,6 +278,7 @@ do_children_tests (void)
   snp0.long_ptr = &y3;
   snp1.long_ptr = &x3;
   snp2.long_ptr = &z3;
+  {int a = 0;}
 }
 
 void