Revert "Fix argument passing in mi_run_cmd_full"
authorSimon Marchi <simon dot marchi at ericsson dot com>
Wed, 21 May 2014 21:22:48 +0000 (17:22 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 21 May 2014 21:50:10 +0000 (17:50 -0400)
This reverts commit 8c217a4b684386aa5ce6a078dffbe63265a524e6.

Following this

https://sourceware.org/ml/gdb-patches/2014-05/msg00462.html

I suggest reverting my previous commit. I will follow with another
patch to add comments, to clarify some things as stated in the mail
thread.

I ran make check with on gdb.mi, and the test that the commit broke
passes again.

gdb/testsuite/ChangeLog:

2014-05-21  Simon Marchi  <simon.marchi@ericsson.com>

* lib/mi-support.exp (mi_run_cmd_full): Revert to original
behavior for $args, pass it directly to "run".

gdb/testsuite/ChangeLog
gdb/testsuite/lib/mi-support.exp

index fccceb723ff3157f87e447e90a313e66d8c993b1..80c0226e11fb207c3c7dea81098fd2b5cecfeae9 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-21  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * lib/mi-support.exp (mi_run_cmd_full): Revert to original
+       behavior for $args, pass it directly to "run".
+
 2014-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * lib/gdb.exp (default_gdb_init): Bump `match_max' up from
index afe13e83b105f6c996ef610de1d0547a7c672f5d..6d011b9c357fe90581143a47ae2036dc4111b815 100644 (file)
@@ -818,11 +818,9 @@ proc mi_run_cmd_full {use_mi_command args} {
     if {$use_mi_command} {
        set run_prefix "220-exec-"
        set run_match "220"
-       set set_args_cmd "-exec-arguments"
     } else {
        set run_prefix ""
        set run_match ""
-       set set_args_cmd "set args"
     }
 
     if [target_info exists gdb_init_command] {
@@ -864,16 +862,7 @@ proc mi_run_cmd_full {use_mi_command args} {
        return 0
     }
 
-    send_gdb "${set_args_cmd} $args\n"
-    gdb_expect {
-       -re "$mi_gdb_prompt$" { }
-       default {
-           perror "settings args failed"
-           return -1
-       }
-    }
-
-    send_gdb "${run_prefix}run\n"
+    send_gdb "${run_prefix}run $args\n"
     gdb_expect {
        -re "${run_match}\\^running\r\n(\\*running,thread-id=\"\[^\"\]+\"\r\n|=thread-created,id=\"1\",group-id=\"\[0-9\]+\"\r\n)*(${library_loaded_re})*(${thread_selected_re})?${mi_gdb_prompt}" {
        }