From 7799cde44b10a943380db2a760015180f2dd226c Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 15 Oct 2012 21:31:19 +0000 Subject: [PATCH] Fix recent gdb_breakpoint regression. * gdb.java/jmisc.exp: gdb_breakpoint for $function - remove curly braces from the parameter. * gdb.java/jprint.exp: Likewise. * lib/gdb.exp (runto): Fix call to gdb_breakpoint. --- gdb/testsuite/ChangeLog | 12 ++++++++++++ gdb/testsuite/gdb.java/jmisc.exp | 4 ++-- gdb/testsuite/gdb.java/jprint.exp | 4 ++-- gdb/testsuite/lib/gdb.exp | 5 ++++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1c6156e9d6f..422cebe3f5d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2012-10-15 Jan Kratochvil + Doug Evans + + Fix recent gdb_breakpoint regression. + * gdb.java/jmisc.exp: gdb_breakpoint for $function - remove curly + braces from the parameter. + * gdb.java/jprint.exp: Likewise. + +2012-10-15 Doug Evans + + * lib/gdb.exp (runto): Fix call to gdb_breakpoint. + 2012-10-11 Doug Evans PR breakpoints/14643. diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp index 72158613ead..4bd1800a589 100644 --- a/gdb/testsuite/gdb.java/jmisc.exp +++ b/gdb/testsuite/gdb.java/jmisc.exp @@ -43,8 +43,8 @@ if [set_lang_java] then { # signature. runto_main set function "${testfile}.main(java.lang.String\[\])" - gdb_breakpoint "$function" { allow-pending } - gdb_breakpoint "${function}void" { allow-pending } + gdb_breakpoint "$function" allow-pending + gdb_breakpoint "${function}void" allow-pending gdb_continue_to_breakpoint $function gdb_test_multiple "ptype jmisc" "ptype jmisc" { diff --git a/gdb/testsuite/gdb.java/jprint.exp b/gdb/testsuite/gdb.java/jprint.exp index b2d5d310cc3..116a4bafd59 100644 --- a/gdb/testsuite/gdb.java/jprint.exp +++ b/gdb/testsuite/gdb.java/jprint.exp @@ -43,8 +43,8 @@ if [set_lang_java] then { # signature. runto_main set function "${testfile}.main(java.lang.String\[\])" - gdb_breakpoint "$function" { allow-pending } - gdb_breakpoint "${function}void" { allow-pending } + gdb_breakpoint "$function" allow-pending + gdb_breakpoint "${function}void" allow-pending gdb_continue_to_breakpoint $function gdb_test "p jvclass.addprint(4,5,6)" " = 15" "unambiguous static call" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index cd128ba2458..df2d81839e2 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.47.2