Re: [PATCH v2 9/9] enable target-async

Yao Qi
2013-08-01T08:34:53Z

On 08/01/2013 02:28 AM, Tom Tromey wrote:
> +/* Flag indicating whether the most recent command was executed via
> + the CLI interpreter. */
> +int mi_last_was_cli;
> +

In patch 6/9, a new field 'command_interp' is added to 'struct
thread_control_state', as below,

> +
> + /* The interpreter that issued the execution command. NULL if the
> + thread was resumed as a result of a command applied to some other
> + thread (e.g., "next" with scheduler-locking off). */
> + struct interp *command_interp;

looks we can iterate over all threads, to check field command_interp to
know what interpreter is used by the previous command (assuming that
there should be only one thread whose command_interp is not NULL), so
that this flag 'mi_last_was_cli' can be removed?

--
Yao (é½å°§)