[patch/testsuite/mi] mi*-var-*.exp: use gdb_get_line_number
Michael Chastain
mec.gnu@mindspring.com
Mon Aug 16 08:49:00 GMT 2004
More gdb_get_line_number. This hits every mi*-*.exp file that
uses var-cmd.c.
Tested on native i686-pc-linux-gnu with gcc 2.95.3, gcc 3.3.4,
and gcc 3.4.1, with dwarf-2 and stabs+. Also tested with a block
of extra lines at the beginning of var-cmd.c to check the line
number logic.
Once again, some test names with absolute line numbers changed
their names from "foo: 123" to "foo: $line_bar".
This patch was pre-approved by Andrew. I'll give it 24 hours
for any comments, then commit it.
===
2004-08-16 Michael Chastain <mec.gnu@mindspring.com>
* gdb.mi/mi-var-block.exp: Use gdb_get_line_number. Remove
reference to bug-gnu@prep.ai.mit.edu.
* gdb.mi/mi-var-child.exp: Likewise.
* gdb.mi/mi-var-cmd.exp: Likewise.
* gdb.mi/mi-var-display.exp: Likewise.
* gdb.mi/mi2-var-block.exp: Likewise.
* gdb.mi/mi2-var-child.exp: Likewise.
* gdb.mi/mi2-var-cmd.exp: Likewise.
* gdb.mi/mi2-var-display.exp: Likewise.
Index: mi-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-block.exp,v
retrieving revision 1.10
diff -c -3 -p -r1.10 mi-var-block.exp
*** mi-var-block.exp 9 Aug 2004 16:32:44 -0000 1.10
--- mi-var-block.exp 15 Aug 2004 20:15:04 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2004 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_gdb_test "-var-create foo * foo" \
*** 55,61 ****
"create local variable foo"
# step to "foo = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
# Be paranoid and assume 3.2 created foo
--- 52,60 ----
"create local variable foo"
# step to "foo = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo = 123;"] \
! "step at do_block_test"
# Be paranoid and assume 3.2 created foo
*************** mi_gdb_test "-var-create foo * foo" \
*** 71,77 ****
"create local variable foo"
# step to "foo2 = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
--- 70,78 ----
"create local variable foo"
# step to "foo2 = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo2 = 123;"] \
! "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
*************** mi_gdb_test "-var-update *" \
*** 80,86 ****
"update all vars: cb foo changed"
# step to "foo = 321;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
--- 81,89 ----
"update all vars: cb foo changed"
# step to "foo = 321;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo = 321;"] \
! "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
*************** mi_gdb_test "-var-create inner_foo * foo
*** 89,95 ****
"create local variable inner_foo"
# step to "foo2 = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
--- 92,100 ----
"create local variable inner_foo"
# step to "foo2 = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo2 = 0;"] \
! "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
*************** mi_gdb_test "-var-delete inner_foo" \
*** 121,127 ****
"delete var inner_foo"
# step to "foo = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
--- 126,134 ----
"delete var inner_foo"
# step to "foo = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo = 0;"] \
! "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
*************** mi_gdb_test "-var-update foo2" \
*** 132,138 ****
clear_xfail *-*-*
# step to "cb = 21;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
--- 139,147 ----
clear_xfail *-*-*
# step to "cb = 21;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "cb = 21;"] \
! "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
Index: mi-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v
retrieving revision 1.16
diff -c -3 -p -r1.16 mi-var-child.exp
*** mi-var-child.exp 9 Aug 2004 16:32:44 -0000 1.16
--- mi-var-child.exp 15 Aug 2004 20:15:04 -0000
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_gdb_test "-var-info-num-children stru
*** 555,562 ****
# Step to "struct_declarations.integer = 123;"
! set line 192
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line"
# Test: c_variable-4.81
# Desc: create local variable "weird"
--- 552,560 ----
# Step to "struct_declarations.integer = 123;"
! set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! $line_dct_123 "step to line \$line_dct_123"
# Test: c_variable-4.81
# Desc: create local variable "weird"
*************** mi_gdb_test "-var-update *" \
*** 754,761 ****
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
! set line 193
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.2
# Desc: check that integer changed
--- 752,759 ----
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 1] "step \$line_dct_123 + 1"
# Test: c_variable-5.2
# Desc: check that integer changed
*************** mi_gdb_test "-var-update *" \
*** 767,774 ****
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
! set line 196
! mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
--- 765,772 ----
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
! mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 4] {} "step \$line_dct_123 + 4"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
*************** mi_gdb_test "-var-update *" \
*** 777,784 ****
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
! set line 197
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
--- 775,782 ----
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 5] "step \$line_dct_123 + 5"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
*************** mi_gdb_test "-var-update *" \
*** 787,794 ****
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
! set line 198
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
--- 785,792 ----
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 6] "step \$line_dct_123 + 6"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
*************** mi_gdb_test "-var-update *" \
*** 797,804 ****
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
! set line 199
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
--- 795,802 ----
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 7] "step \$line_dct_123 + 7"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
*************** mi_gdb_test "-var-update *" \
*** 807,814 ****
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
! set line 200
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
--- 805,812 ----
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 8] "step \$line_dct_123 + 8"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
*************** mi_gdb_test "-var-update *" \
*** 824,831 ****
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
! set line 208
! mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
--- 822,831 ----
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
!
! set line_dct_nothing [gdb_get_line_number "weird->func_ptr = nothing;"]
! mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
! $line_dct_nothing {} "step \$line_dct_nothing"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
*************** mi_gdb_test "-var-list-children --all-va
*** 838,845 ****
"listing of names and values of children"
# Step over "weird->func_ptr = nothing;"
! set line 211
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
--- 838,846 ----
"listing of names and values of children"
# Step over "weird->func_ptr = nothing;"
! set line_dct_a0_0 [gdb_get_line_number "a0 = '0';"]
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! $line_dct_a0_0 "step \$line_dct_a0_0"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
*************** mi_gdb_test "-var-delete weird->int_ptr_
*** 859,866 ****
# Step over all lines:
# ...
# psnp = &snp0;
! set line 254
! mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
--- 860,869 ----
# Step over all lines:
# ...
# psnp = &snp0;
!
! set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
! mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
*************** mi_gdb_test "-var-list-children psnp->pt
*** 1130,1137 ****
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
! set line 255
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
--- 1133,1140 ----
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 2] "step \$line_dct_snp0 + 2"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1140,1147 ****
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
! set line 256
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
--- 1143,1150 ----
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 3] "step \$line_dct_snp0 + 3"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1151,1158 ****
# Step over "snp2.char_ptr = &a3;"
! set line 257
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
--- 1154,1161 ----
# Step over "snp2.char_ptr = &a3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 4] "step \$line_dct_snp0 + 4"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1162,1169 ****
# Step over "snp0.long_ptr = &y3;"
! set line 258
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
--- 1165,1172 ----
# Step over "snp0.long_ptr = &y3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 5] "step \$line_dct_snp0 + 5"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1173,1180 ****
# Step over "snp1.long_ptr = &x3;"
! set line 259
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
--- 1176,1183 ----
# Step over "snp1.long_ptr = &x3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 6] "step \$line_dct_snp0 + 6"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
*************** clear_xfail *-*-*
*** 1190,1197 ****
#
# Step over "snp2.long_ptr = &z3;"
! set line 260
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
--- 1193,1200 ----
#
# Step over "snp2.long_ptr = &z3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 7] "step \$line_dct_snp0 + 7"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
Index: mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.16
diff -c -3 -p -r1.16 mi-var-cmd.exp
*** mi-var-cmd.exp 9 Aug 2004 16:32:44 -0000 1.16
--- mi-var-cmd.exp 15 Aug 2004 20:15:05 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2004 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_gdb_test "-var-update *" \
*** 168,174 ****
"update all vars"
# Step over "linteger = 1234;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
--- 165,172 ----
"update all vars"
# Step over "linteger = 1234;"
! set line_dlt_linteger [gdb_get_line_number "lpinteger = &linteger;"]
! mi_step_to "do_locals_tests" "" "var-cmd.c" $line_dlt_linteger "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
*************** mi_gdb_test "-var-update *" \
*** 177,183 ****
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
--- 175,181 ----
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 1] "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
*************** mi_gdb_test "-var-update *" \
*** 186,192 ****
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
! mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
--- 184,190 ----
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
! mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 2] "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
*************** mi_gdb_test "-var-update *" \
*** 195,201 ****
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
--- 193,199 ----
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 3] "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
*************** mi_gdb_test "-var-update *" \
*** 216,222 ****
# lsimple.character = 'a';
mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" "119" "" "step at do_locals_tests (5)"
# Test: c_variable-2.6
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
--- 214,220 ----
# lsimple.character = 'a';
mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" [expr $line_dlt_linteger + 12] "" "step at do_locals_tests (5)"
# Test: c_variable-2.6
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
*************** mi_gdb_test "-var-update *" \
*** 231,238 ****
# lpsimple = &lsimple;
# func = nothing;
mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" "125" "" "step at do_locals_tests (6)"
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
--- 229,238 ----
# lpsimple = &lsimple;
# func = nothing;
+ set line_dlt_4321 [gdb_get_line_number "linteger = 4321;"]
+
mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" $line_dlt_4321 "" "step at do_locals_tests (6)"
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
*************** mi_gdb_test "-var-update *" \
*** 251,257 ****
# lsimple.character = 'b';
mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" "133" "" "step at do_locals_tests (7)"
# Test: c_variable-2.8
# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
--- 251,257 ----
# lsimple.character = 'b';
mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" [expr $line_dlt_4321 + 8] "" "step at do_locals_tests (7)"
# Test: c_variable-2.8
# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
*************** mi_gdb_test "-var-assign lsimple.integer
*** 384,395 ****
# End of assign tests
#####
mi_gdb_test "-break-insert subroutine1" \
! "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \
"break-insert subroutine1"
mi_continue_to "2" "subroutine1" \
"\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
! "var-cmd.c" "146" "continue to subroutine1"
# Test: c_variable-2.10
# Desc: create variable for locals i,l in subroutine1
--- 384,397 ----
# End of assign tests
#####
+ set line_subroutine1_body [gdb_get_line_number "global_simple.integer = i + 3;"]
+
mi_gdb_test "-break-insert subroutine1" \
! "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"$line_subroutine1_body\",times=\"0\"\}" \
"break-insert subroutine1"
mi_continue_to "2" "subroutine1" \
"\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
! "var-cmd.c" $line_subroutine1_body "continue to subroutine1"
# Test: c_variable-2.10
# Desc: create variable for locals i,l in subroutine1
*************** mi_gdb_test "-var-create linteger * lint
*** 408,414 ****
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" "147" "step at subroutine1"
# Test: c_variable-2.12
# Desc: change global_simple.integer
--- 410,416 ----
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" [expr $line_subroutine1_body + 1] "step at subroutine1"
# Test: c_variable-2.12
# Desc: change global_simple.integer
*************** mi_gdb_test "-var-update *" \
*** 424,430 ****
clear_xfail *-*-*
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" "148" "step at subroutine1 (2)"
# Test: c_variable-2.13
# Desc: change subroutine1 local i
--- 426,432 ----
clear_xfail *-*-*
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" [expr $line_subroutine1_body + 2] "step at subroutine1 (2)"
# Test: c_variable-2.13
# Desc: change subroutine1 local i
*************** mi_gdb_test "-var-update *" \
*** 433,439 ****
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" "149" "step at subroutine1 (3)"
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
--- 435,441 ----
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" [expr $line_subroutine1_body + 3] "step at subroutine1 (3)"
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
*************** mi_gdb_test "-var-update *" \
*** 441,447 ****
"\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
! mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
--- 443,451 ----
"\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
! set line_dlt_call_subroutine1 [gdb_get_line_number "subroutine1 (linteger, &llong);"]
! mi_next_to "do_locals_tests" "" "var-cmd.c" \
! [expr $line_dlt_call_subroutine1 + 1] "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
Index: mi-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v
retrieving revision 1.11
diff -c -3 -p -r1.11 mi-var-display.exp
*** mi-var-display.exp 9 Aug 2004 16:32:44 -0000 1.11
--- mi-var-display.exp 15 Aug 2004 20:15:05 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002, 2003 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_delete_breakpoints
*** 42,55 ****
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
! mi_gdb_test "200-break-insert 260" \
! "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",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=\"260\"\}\r\n$mi_gdb_prompt$" {
pass "run to do_children_tests"
}
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
--- 39,54 ----
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]
!
! 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\"\}" \
"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$" {
pass "run to do_children_tests"
}
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
*************** mi_gdb_test "-var-delete weird" \
*** 324,336 ****
##### #####
# Stop in "do_special_tests"
mi_gdb_test "200-break-insert do_special_tests" \
! "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
--- 323,338 ----
##### #####
# Stop in "do_special_tests"
+
+ set line_dst_a_1 [gdb_get_line_number "a = 1;"]
+
mi_gdb_test "200-break-insert do_special_tests" \
! "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_a_1\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dst_a_1\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
*************** gdb_expect {
*** 583,597 ****
timeout { fail "print FP register (timeout)"}
}
mi_gdb_test "200-break-insert incr_a" \
! "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
pass "continue to incr_a"
}
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
fail "continue to incr_a (compiler debug info incorrect)"
}
-re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
--- 585,601 ----
timeout { fail "print FP register (timeout)"}
}
+ set line_incr_a_b_a [gdb_get_line_number "b = a;"]
+
mi_gdb_test "200-break-insert incr_a" \
! "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\"\}\r\n$mi_gdb_prompt$" {
pass "continue to incr_a"
}
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"([expr $line_incr_a_b_a - 2]|[expr $line_incr_a_b_a - 1]|$line_incr_a_b_a)\"\}\r\n$mi_gdb_prompt$" {
fail "continue to incr_a (compiler debug info incorrect)"
}
-re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
Index: mi2-var-block.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-block.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 mi2-var-block.exp
*** mi2-var-block.exp 9 Aug 2004 22:21:54 -0000 1.2
--- mi2-var-block.exp 15 Aug 2004 20:15:05 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002, 2003 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_gdb_test "-var-create foo * foo" \
*** 55,61 ****
"create local variable foo"
# step to "foo = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test"
# Be paranoid and assume 3.2 created foo
--- 52,60 ----
"create local variable foo"
# step to "foo = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo = 123;"] \
! "step at do_block_test"
# Be paranoid and assume 3.2 created foo
*************** mi_gdb_test "-var-create foo * foo" \
*** 71,77 ****
"create local variable foo"
# step to "foo2 = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
--- 70,78 ----
"create local variable foo"
# step to "foo2 = 123;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo2 = 123;"] \
! "step at do_block_test"
# Test: c_variable-3.4
# Desc: check foo, cb changed
*************** mi_gdb_test "-var-update *" \
*** 80,86 ****
"update all vars: cb foo changed"
# step to "foo = 321;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
--- 81,89 ----
"update all vars: cb foo changed"
# step to "foo = 321;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo = 321;"] \
! "step at do_block_test"
# Test: c_variable-3.5
# Desc: create inner block foo
*************** mi_gdb_test "-var-create inner_foo * foo
*** 89,95 ****
"create local variable inner_foo"
# step to "foo2 = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
--- 92,100 ----
"create local variable inner_foo"
# step to "foo2 = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo2 = 0;"] \
! "step at do_block_test"
# Test: c_variable-3.6
# Desc: create foo2
*************** mi_gdb_test "-var-delete inner_foo" \
*** 121,127 ****
"delete var inner_foo"
# step to "foo = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
--- 126,134 ----
"delete var inner_foo"
# step to "foo = 0;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "foo = 0;"] \
! "step at do_block_test"
# Test: c_variable-3.8
# Desc: check that foo2 out of scope (known gdb problem)
*************** mi_gdb_test "-var-update foo2" \
*** 132,138 ****
clear_xfail *-*-*
# step to "cb = 21;"
! mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
--- 139,147 ----
clear_xfail *-*-*
# step to "cb = 21;"
! mi_step_to "do_block_tests" "" "var-cmd.c" \
! [gdb_get_line_number "cb = 21;"] \
! "step at do_block_test"
# Test: c_variable-3.9
# Desc: check that only cb is in scope (known gdb problem)
Index: mi2-var-child.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-child.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 mi2-var-child.exp
*** mi2-var-child.exp 9 Aug 2004 22:21:54 -0000 1.2
--- mi2-var-child.exp 15 Aug 2004 20:15:05 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation
# 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
# 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_gdb_test "-var-info-num-children stru
*** 555,562 ****
# Step to "struct_declarations.integer = 123;"
! set line 192
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line"
# Test: c_variable-4.81
# Desc: create local variable "weird"
--- 552,560 ----
# Step to "struct_declarations.integer = 123;"
! set line_dct_123 [gdb_get_line_number "struct_declarations.integer = 123;"]
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! $line_dct_123 "step to line \$line_dct_123"
# Test: c_variable-4.81
# Desc: create local variable "weird"
*************** mi_gdb_test "-var-update *" \
*** 754,761 ****
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
! set line 193
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.2
# Desc: check that integer changed
--- 752,759 ----
"update all vars. None changed"
# Step over "struct_declarations.integer = 123;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 1] "step \$line_dct_123 + 1"
# Test: c_variable-5.2
# Desc: check that integer changed
*************** mi_gdb_test "-var-update *" \
*** 767,774 ****
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
! set line 196
! mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
--- 765,772 ----
# weird->char_ptr = "hello";
# bar = 2121;
# foo = &bar;
! mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 4] {} "step \$line_dct_123 + 4"
# Test: c_variable-5.3
# Desc: check that char_ptr changed
*************** mi_gdb_test "-var-update *" \
*** 777,784 ****
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
! set line 197
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
--- 775,782 ----
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 5] "step \$line_dct_123 + 5"
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
*************** mi_gdb_test "-var-update *" \
*** 787,794 ****
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
! set line 198
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
--- 785,792 ----
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 6] "step \$line_dct_123 + 6"
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
*************** mi_gdb_test "-var-update *" \
*** 797,804 ****
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
! set line 199
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
--- 795,802 ----
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 7] "step \$line_dct_123 + 7"
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
*************** mi_gdb_test "-var-update *" \
*** 807,814 ****
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
! set line 200
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
--- 805,812 ----
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_123 + 8] "step \$line_dct_123 + 8"
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
*************** mi_gdb_test "-var-update *" \
*** 824,831 ****
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
! set line 208
! mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
--- 822,831 ----
# struct_declarations.long_array[7] = 8901;
# weird->long_array[8] = 9012;
# struct_declarations.long_array[9] = 1234;
!
! set line_dct_nothing [gdb_get_line_number "weird->func_ptr = nothing;"]
! mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
! $line_dct_nothing {} "step \$line_dct_nothing"
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
*************** mi_gdb_test "-var-update *" \
*** 835,842 ****
# Step over "weird->func_ptr = nothing;"
! set line 211
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
--- 835,843 ----
# Step over "weird->func_ptr = nothing;"
! set line_dct_a0_0 [gdb_get_line_number "a0 = '0';"]
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! $line_dct_a0_0 "step \$line_dct_a0_0"
# Test: c_variable-5.9
# Desc: check that func_ptr changed
*************** mi_gdb_test "-var-delete weird->int_ptr_
*** 856,863 ****
# Step over all lines:
# ...
# psnp = &snp0;
! set line 254
! mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
--- 857,866 ----
# Step over all lines:
# ...
# psnp = &snp0;
!
! set line_dct_snp0 [gdb_get_line_number "psnp = &snp0;"]
! mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 1] {} "step \$line_dct_snp0 + 1"
# Test: c_variable-5.10
# Desc: create psnp->char_ptr
*************** mi_gdb_test "-var-list-children psnp->pt
*** 1127,1134 ****
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
! set line 255
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
--- 1130,1137 ----
"get children of psnp->ptrs.0.next.next.ptrs"
# Step over "snp0.char_ptr = &b3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 2] "step \$line_dct_snp0 + 2"
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1137,1144 ****
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
! set line 256
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
--- 1140,1147 ----
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 3] "step \$line_dct_snp0 + 3"
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1148,1155 ****
# Step over "snp2.char_ptr = &a3;"
! set line 257
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
--- 1151,1158 ----
# Step over "snp2.char_ptr = &a3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 4] "step \$line_dct_snp0 + 4"
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1159,1166 ****
# Step over "snp0.long_ptr = &y3;"
! set line 258
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
--- 1162,1169 ----
# Step over "snp0.long_ptr = &y3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 5] "step \$line_dct_snp0 + 5"
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
*************** mi_gdb_test "-var-update *" \
*** 1170,1177 ****
# Step over "snp1.long_ptr = &x3;"
! set line 259
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
--- 1173,1180 ----
# Step over "snp1.long_ptr = &x3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 6] "step \$line_dct_snp0 + 6"
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
*************** clear_xfail *-*-*
*** 1187,1194 ****
#
# Step over "snp2.long_ptr = &z3;"
! set line 260
! mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
--- 1190,1197 ----
#
# Step over "snp2.long_ptr = &z3;"
! mi_step_to do_children_tests {} {.*var-cmd.c} \
! [expr $line_dct_snp0 + 7] "step \$line_dct_snp0 + 7"
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
Index: mi2-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 mi2-var-cmd.exp
*** mi2-var-cmd.exp 9 Aug 2004 22:21:54 -0000 1.2
--- mi2-var-cmd.exp 15 Aug 2004 20:15:05 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002, 2003 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_gdb_test "-var-update *" \
*** 168,174 ****
"update all vars"
# Step over "linteger = 1234;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" "107" "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
--- 165,172 ----
"update all vars"
# Step over "linteger = 1234;"
! set line_dlt_linteger [gdb_get_line_number "lpinteger = &linteger;"]
! mi_step_to "do_locals_tests" "" "var-cmd.c" $line_dlt_linteger "step at do_locals_test"
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
*************** mi_gdb_test "-var-update *" \
*** 177,183 ****
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" 108 "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
--- 175,181 ----
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 1] "step at do_locals_tests (2)"
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
*************** mi_gdb_test "-var-update *" \
*** 186,192 ****
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
! mi_step_to "do_locals_tests" "" "var-cmd.c" "109" "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
--- 184,190 ----
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
! mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 2] "step at do_locals_tests (3)"
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
*************** mi_gdb_test "-var-update *" \
*** 195,201 ****
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" "110" "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
--- 193,199 ----
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
! mi_step_to "do_locals_tests" "" "var-cmd.c" [expr $line_dlt_linteger + 3] "step at do_locals_tests (4)"
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
*************** mi_gdb_test "-var-update *" \
*** 216,222 ****
# lsimple.character = 'a';
mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" "119" "" "step at do_locals_tests (5)"
# Test: c_variable-2.6
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
--- 214,220 ----
# lsimple.character = 'a';
mi_execute_to "exec-step 9" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" [expr $line_dlt_linteger + 12] "" "step at do_locals_tests (5)"
# Test: c_variable-2.6
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
*************** mi_gdb_test "-var-update *" \
*** 231,238 ****
# lpsimple = &lsimple;
# func = nothing;
mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" "125" "" "step at do_locals_tests (6)"
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
--- 229,238 ----
# lpsimple = &lsimple;
# func = nothing;
+ set line_dlt_4321 [gdb_get_line_number "linteger = 4321;"]
+
mi_execute_to "exec-step 4" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" $line_dlt_4321 "" "step at do_locals_tests (6)"
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
*************** mi_gdb_test "-var-update *" \
*** 251,257 ****
# lsimple.character = 'b';
mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" "133" "" "step at do_locals_tests (7)"
# Test: c_variable-2.8
# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
--- 251,257 ----
# lsimple.character = 'b';
mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
! "var-cmd.c" [expr $line_dlt_4321 + 8] "" "step at do_locals_tests (7)"
# Test: c_variable-2.8
# Desc: check whether linteger, lcharacter, llong, lfoat, ldouble, lsimple.integer,
*************** mi_gdb_test "-var-assign lsimple.integer
*** 384,395 ****
# End of assign tests
#####
mi_gdb_test "-break-insert subroutine1" \
! "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \
"break-insert subroutine1"
mi_continue_to "2" "subroutine1" \
"\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
! "var-cmd.c" "146" "continue to subroutine1"
# Test: c_variable-2.10
# Desc: create variable for locals i,l in subroutine1
--- 384,397 ----
# End of assign tests
#####
+ set line_subroutine1_body [gdb_get_line_number "global_simple.integer = i + 3;"]
+
mi_gdb_test "-break-insert subroutine1" \
! "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"$line_subroutine1_body\",times=\"0\"\}" \
"break-insert subroutine1"
mi_continue_to "2" "subroutine1" \
"\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \
! "var-cmd.c" $line_subroutine1_body "continue to subroutine1"
# Test: c_variable-2.10
# Desc: create variable for locals i,l in subroutine1
*************** mi_gdb_test "-var-create linteger * lint
*** 408,414 ****
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" "147" "step at subroutine1"
# Test: c_variable-2.12
# Desc: change global_simple.integer
--- 410,416 ----
"create linteger"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" [expr $line_subroutine1_body + 1] "step at subroutine1"
# Test: c_variable-2.12
# Desc: change global_simple.integer
*************** mi_gdb_test "-var-update *" \
*** 424,430 ****
clear_xfail *-*-*
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" "148" "step at subroutine1 (2)"
# Test: c_variable-2.13
# Desc: change subroutine1 local i
--- 426,432 ----
clear_xfail *-*-*
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" [expr $line_subroutine1_body + 2] "step at subroutine1 (2)"
# Test: c_variable-2.13
# Desc: change subroutine1 local i
*************** mi_gdb_test "-var-update *" \
*** 433,439 ****
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" "149" "step at subroutine1 (3)"
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
--- 435,441 ----
"update all vars: i changed"
mi_step_to "subroutine1" "\{name=\"i\",value=\".*\"\},\{name=\"l\",value=\".*\"\}" \
! "var-cmd.c" [expr $line_subroutine1_body + 3] "step at subroutine1 (3)"
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
*************** mi_gdb_test "-var-update *" \
*** 441,447 ****
"\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
! mi_next_to "do_locals_tests" "" "var-cmd.c" "136" "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
--- 443,451 ----
"\\^done,changelist=\\\[\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: llong changed"
! set line_dlt_call_subroutine1 [gdb_get_line_number "subroutine1 (linteger, &llong);"]
! mi_next_to "do_locals_tests" "" "var-cmd.c" \
! [expr $line_dlt_call_subroutine1 + 1] "next out of subroutine1"
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
Index: mi2-var-display.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-display.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 mi2-var-display.exp
*** mi2-var-display.exp 9 Aug 2004 22:21:54 -0000 1.3
--- mi2-var-display.exp 15 Aug 2004 20:15:05 -0000
***************
*** 1,4 ****
! # Copyright 1999, 2000, 2001, 2002, 2003 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
--- 1,4 ----
! # Copyright 1999, 2000, 2001, 2002, 2003, 2004 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
***************
*** 14,22 ****
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- # Please email any bugs, comments, and/or additions to this file to:
- # bug-gdb@prep.ai.mit.edu
-
# Test essential Machine interface (MI) operations
#
# Verify that, using the MI, we can create, update, delete variables.
--- 14,19 ----
*************** mi_delete_breakpoints
*** 42,55 ****
mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
! mi_gdb_test "200-break-insert 260" \
! "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",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=\"260\"\}\r\n$mi_gdb_prompt$" {
pass "run to do_children_tests"
}
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
--- 39,54 ----
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]
!
! 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\"\}" \
"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$" {
pass "run to do_children_tests"
}
-re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"}
*************** mi_gdb_test "-var-delete weird" \
*** 324,336 ****
##### #####
# Stop in "do_special_tests"
mi_gdb_test "200-break-insert do_special_tests" \
! "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
--- 323,338 ----
##### #####
# Stop in "do_special_tests"
+
+ set line_dst_a_1 [gdb_get_line_number "a = 1;"]
+
mi_gdb_test "200-break-insert do_special_tests" \
! "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"$line_dst_a_1\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"$line_dst_a_1\"\}\r\n$mi_gdb_prompt$" {
pass "continue to do_special_tests"
}
timeout {
*************** gdb_expect {
*** 583,597 ****
timeout { fail "print FP register (timeout)"}
}
mi_gdb_test "200-break-insert incr_a" \
! "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
pass "continue to incr_a"
}
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
fail "continue to incr_a (compiler debug info incorrect)"
}
-re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
--- 585,601 ----
timeout { fail "print FP register (timeout)"}
}
+ set line_incr_a_b_a [gdb_get_line_number "b = a;"]
+
mi_gdb_test "200-break-insert incr_a" \
! "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\",times=\"0\"\}" \
"break-insert operation"
send_gdb "-exec-continue\n"
gdb_expect {
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"$line_incr_a_b_a\"\}\r\n$mi_gdb_prompt$" {
pass "continue to incr_a"
}
! -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"([expr $line_incr_a_b_a - 2]|[expr $line_incr_a_b_a - 1]|$line_incr_a_b_a)\"\}\r\n$mi_gdb_prompt$" {
fail "continue to incr_a (compiler debug info incorrect)"
}
-re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
More information about the Gdb-patches
mailing list