aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-cli.exp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-19 08:00:39 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-19 08:00:39 +0000
commitdd322c54e38c0e14cae188ba88c07f1679d5a790 (patch)
tree62ef19d10946e81e71b779dfd6950bc558b7b0d9 /gdb/testsuite/gdb.mi/mi-cli.exp
parentf6ebfac0855915796ac643b48c13e4020906af5c (diff)
downloadgdb-dd322c54e38c0e14cae188ba88c07f1679d5a790.zip
gdb-dd322c54e38c0e14cae188ba88c07f1679d5a790.tar.gz
gdb-dd322c54e38c0e14cae188ba88c07f1679d5a790.tar.bz2
gdb/testsuite/
* 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.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-cli.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp15
1 files changed, 9 insertions, 6 deletions
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.