summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-09-11 20:25:36 +0000
committerKeith Seitz <keiths@redhat.com>2002-09-11 20:25:36 +0000
commit9c562db82642857e703d44ff0f22667742882b92 (patch)
tree896d298d400c8c30ae8ac8a559f0f532e0ddb2e6
parent4f6b790b1ba8495f00098acb006d00e6e2f1d138 (diff)
downloadgdb-9c562db82642857e703d44ff0f22667742882b92.tar.gz
* lib/mi-support.exp (mi_step_next_helper): Remove.
(mi_next): Use mi_next_to. (mi_step): Use mi_step_to.
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/lib/mi-support.exp34
2 files changed, 10 insertions, 30 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 15ae005dab8..c2b5820bf76 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-09-11 Keith Seitz <keiths@redhat.com>
+
+ * lib/mi-support.exp (mi_step_next_helper): Remove.
+ (mi_next): Use mi_next_to.
+ (mi_step): Use mi_step_to.
+
2002-09-05 Keith Seitz <keiths@redhat.com>
* lib/mi-support.exp (mi_runto): New proc. Does the same as gdb's
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 770ee3887e1..a8ccd953441 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -686,45 +686,19 @@ proc mi_runto {func} {
}
-# Helper function for mi_next and mi_step
-# CMD is either "step" or "next"
-# TEST is the name of the test (passed to dejagnu's pass/fail)
-# Returns:
-# 0 if passed
-# 1 if failed/timeout
-proc mi_step_next_helper {cmd test} {
- global suppress_flag
- if { $suppress_flag } {
- return 1
- }
-
- global mi_gdb_prompt decimal hex
- send_gdb "220-exec-$cmd\n"
- gdb_expect {
- -re ".*220\\^running\r\n$mi_gdb_prompt.*220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",line=\"$decimal\"\}\r\n$mi_gdb_prompt$" {
- pass "$test"
- return 0
- }
- timeout {
- fail "$test"
- return 1
- }
- }
-}
-
# Next to the next statement
-# For return values, see mi_step_next_helper
+# For return values, see mi_run_to_helper
proc mi_next { test } {
- return [mi_step_next_helper next $test]
+ return [mi_next_to {.*} {.*} {.*} {.*} $test]
}
# Step to the next statement
-# For return values, see mi_step_next_helper
+# For return values, see mi_run_to_helper
proc mi_step { test } {
- return [mi_step_next_helper step $test]
+ return [mi_step_to {.*} {.*} {.*} {.*} $test]
}
# cmd should not include the number or newline (i.e. "exec-step 3", not