From 2c47921e64abfc0aa3d3187e0c23943138ec3783 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 15 Oct 2012 17:35:54 +0000 Subject: [PATCH] * lib/gdb.exp (runto): Fix call to gdb_breakpoint. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/lib/gdb.exp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 + + * lib/gdb.exp (runto): Fix call to gdb_breakpoint. + 2012-10-15 Yufeng Zhang * 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; } -- 2.30.2