* gdb.base/gcore.exp (capture_command_output): Use
authorDaniel Jacobowitz <drow@false.org>
Mon, 1 Feb 2010 17:15:36 +0000 (17:15 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 1 Feb 2010 17:15:36 +0000 (17:15 +0000)
gdb_test_multiple.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/gcore.exp

index 00f4aeca249c95ff871b907c8e5817def5d08064..b0e7ea937d17eb921de8757131788b70fb3af9aa 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * gdb.base/gcore.exp (capture_command_output): Use
+       gdb_test_multiple.
+
 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * gdb.arch/thumb2-it.S (it_breakpoints): New function.
index 8ed966ca33d74e6482a03f3dae20009190d24a25..ee202840d2791557df7c240302192d905c76d9d1 100644 (file)
@@ -69,14 +69,10 @@ proc capture_command_output { command prefix } {
     global expect_out
 
     set output_string ""
-    send_gdb "$command\n"
-    gdb_expect {
+    gdb_test_multiple "$command" "capture_command_output for $command" {
        -re "${command}\[\r\n\]+${prefix}(.*)\[\r\n\]+$gdb_prompt $" {
            set output_string $expect_out(1,string)
        }
-       default {
-           fail "capture_command_output failed on $command."
-       }
     }
     return $output_string
 }