This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][PATCH] Fixes to gdb.mi testsuite


On 05/29/2013 10:38 PM, Simon Marchi wrote:
MI notification =cmd-param-changed is not suppressed by mistake in
>GDB.  I've post a patch
><http://sourceware.org/ml/gdb-patches/2013-05/msg00976.html>  to fix
>it.  Once it is committed, this part can simplified.
Thanks.


The patch was committed.

>>+        }
>>+        default {
>>+            fail "-exec-arguments output not matched"
>>+            return -1
>>+        }
>>+        }
>>+    }
>>+    }
>>+
>>        send_gdb "${run_prefix}run $args\n"
>
>Looks the $args are passed to -exec-run command, but -exec-run command
>doesn't pass args to the inferior.  See mi/mi-main.c:mi_cmd_exec_run.
>If we can teach MI command -exec-run pass argument to inferior (not
>sure it is a good idea or not), we don't have to use -exec-arguments
>here.
When $use_mi_command is false, then the command is simply "run"
(${run_prefix} is empty), which passes the arguments to the inferior.

Yes, if CLI command 'run' can pass arguments to inferior, why doesn't MI command '-exec-run' do the same thing? Unless there are some difficulties I don't realize to teach MI command '-exec-run' to pass arguments to inferior, I still prefer this way.

What do you think? I left out the check for "llength $args > 0". If no
args are passed to mi_run_cmd_full, we want to make sure to erase any
arguments that could have been set previously. Also, should I use
gdb_test_no_output instead of send_gdb for -exec-arguments and set args?

We don't use gdb_test_no_output in MI test cases. I am not the people to approve or reject your patch, so probably you can update your patch on top of cvs trunk to discard the matching on "=cmd-param-changed", post a clean patch again, and see what other people think about it.

--
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]