aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog16
-rw-r--r--gdb/testsuite/gdb.mi/mi-break.exp5
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp15
-rw-r--r--gdb/testsuite/gdb.mi/mi2-cli.exp12
4 files changed, 36 insertions, 12 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 4d6b55a..9c3dc80 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-19 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.mi/mi-break.exp (set line_callme_head, set line_callme_body): New.
+ (test_ignore_count): Declare line_callme_body global.
+ (run to breakpoint with ignore count): Use line_callme_body.
+ * gdb.mi/mi-cli.exp (set line_main_head, set line_main_body)
+ (set line_main_hello, set line_main_return): Reindent.
+ (set line_callee4_head, set line_callee4_body, set line_callee4_next):
+ New.
+ (continue to callee4): Use line_callee4_body.
+ (check *stopped from CLI command): Use line_callee4_next.
+ * gdb.mi/mi2-cli.exp (set line_main_head, set line_main_body)
+ (set line_main_hello, set line_main_return): Reindent.
+ (set line_callee4_head, set line_callee4_body): New.
+ (continue to callee4): Use line_callee4_body.
+
2010-01-18 Tom Tromey <tromey@redhat.com>
PR c++/9680:
diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp
index 1064f13..93d605c 100644
--- a/gdb/testsuite/gdb.mi/mi-break.exp
+++ b/gdb/testsuite/gdb.mi/mi-break.exp
@@ -56,6 +56,8 @@ set line_callee1_head [gdb_get_line_number "callee1 ("]
set line_callee1_body [expr $line_callee1_head + 2]
set line_main_head [gdb_get_line_number "main ("]
set line_main_body [expr $line_main_head + 2]
+set line_callme_head [gdb_get_line_number "callme ("]
+set line_callme_body [expr $line_callme_head + 2]
set fullname "fullname=\"${fullname_syntax}${srcfile}\""
@@ -152,6 +154,7 @@ proc test_rbreak_creation_and_listing {} {
proc test_ignore_count {} {
global mi_gdb_prompt
+ global line_callme_body
mi_gdb_test "-break-insert -i 1 callme" \
"\\^done.*ignore=\"1\".*" \
@@ -159,7 +162,7 @@ proc test_ignore_count {} {
mi_run_cmd
- mi_expect_stop "breakpoint-hit" "callme" "\{name=\"i\",value=\"2\"\}" ".*basics.c" "52" \
+ mi_expect_stop "breakpoint-hit" "callme" "\{name=\"i\",value=\"2\"\}" ".*basics.c" $line_callme_body \
{"" "disp=\"keep\"" } "run to breakpoint with ignore count"
}
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index 4ab2a20..92fceff 100644
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -63,10 +63,13 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
mi_run_to_main
-set line_main_head [gdb_get_line_number "main ("]
-set line_main_body [expr $line_main_head + 2]
-set line_main_hello [gdb_get_line_number "Hello, World!"]
-set line_main_return [expr $line_main_hello + 2]
+set line_main_head [gdb_get_line_number "main ("]
+set line_main_body [expr $line_main_head + 2]
+set line_main_hello [gdb_get_line_number "Hello, World!"]
+set line_main_return [expr $line_main_hello + 2]
+set line_callee4_head [gdb_get_line_number "callee4 ("]
+set line_callee4_body [expr $line_callee4_head + 2]
+set line_callee4_next [expr $line_callee4_body + 1]
mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
{\^done} \
@@ -97,7 +100,7 @@ mi_gdb_test "-interpreter-exec console \"list\"" \
".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \
"-interpreter-exec console \"list\""
-mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" "28" \
+mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" $line_callee4_body \
{ "" "disp=\"keep\"" } "continue to callee4"
# NOTE: cagney/2003-02-03: Not yet.
@@ -155,7 +158,7 @@ if {$async} {
set reason ""
}
-mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c" "29" \
+mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c" $line_callee4_next \
"" "check *stopped from CLI command"
# NOTE: cagney/2003-02-03: Not yet.
diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp
index 46055ec..cf1eadb 100644
--- a/gdb/testsuite/gdb.mi/mi2-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi2-cli.exp
@@ -63,10 +63,12 @@ mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
mi_run_to_main
-set line_main_head [gdb_get_line_number "main ("]
-set line_main_body [expr $line_main_head + 2]
-set line_main_hello [gdb_get_line_number "Hello, World!"]
-set line_main_return [expr $line_main_hello + 2]
+set line_main_head [gdb_get_line_number "main ("]
+set line_main_body [expr $line_main_head + 2]
+set line_main_hello [gdb_get_line_number "Hello, World!"]
+set line_main_return [expr $line_main_hello + 2]
+set line_callee4_head [gdb_get_line_number "callee4 ("]
+set line_callee4_body [expr $line_callee4_head + 2]
mi_gdb_test "-interpreter-exec console \"set args foobar\"" \
{\^done} \
@@ -97,7 +99,7 @@ mi_gdb_test "-interpreter-exec console \"list\"" \
".*\~\"$line_main_body\[\\\\t \]*callee1.*;\\\\n\".*\\^done" \
"-interpreter-exec console \"list\""
-mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" "28" \
+mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" $line_callee4_body \
{ "" "disp=\"keep\"" } \
"continue to callee4"