summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-10-15 17:35:54 +0000
committerDoug Evans <dje@google.com>2012-10-15 17:35:54 +0000
commit84b4fe601987a7754dca0024a4e0b42c8e71f0c2 (patch)
tree4c7bd4f3d281ba687a4543b0efe6ea6d7da904fd
parent356d1d858ee29e61ed75b6209ecaa1fd1c21188f (diff)
downloadgdb-84b4fe601987a7754dca0024a4e0b42c8e71f0c2.tar.gz
* lib/gdb.exp (runto): Fix call to gdb_breakpoint.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/lib/gdb.exp5
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d3f55441906..ceefea58b63 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2012-10-15 Doug Evans <dje@google.com>
+
+ * lib/gdb.exp (runto): Fix call to gdb_breakpoint.
+
2012-10-15 Yufeng Zhang <yufeng.zhang@arm.com>
* gdb.dwarf2/dw2-icc-opaque.S: Remove '#'.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 33529ccb442..f27d4a7d86b 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -460,7 +460,10 @@ proc runto { function args } {
# We need to use eval here to pass our varargs args to gdb_breakpoint
# which is also a varargs function.
- if ![eval gdb_breakpoint $function $args] {
+ # But we also have to be careful because $function may have multiple
+ # elements, and we don't want Tcl to move the remaining elements after
+ # the first to $args. That is why $function is wrapped in {}.
+ if ![eval gdb_breakpoint {$function} $args] {
return 0;
}