[PATCH master + 11] gdb: disable commit-resumed on -exec-interrupt --thread-group

Pedro Alves pedro@palves.net
Tue Jul 13 12:24:34 GMT 2021


On 2021-07-12 9:28 p.m., Simon Marchi wrote:
> On 2021-07-12 4:52 a.m., Pedro Alves wrote:

>>> +# This test uses non-stop, which requires displaced stepping.
>>> +if { ![support_displaced_stepping] } {
>>> +    unsupported "displaced stepping"
>>> +    return -1
>>> +}
>>
>> This is not true nowadays -- displaced stepping isn't a requirement for non-stop, it's
>> "merely" an optimization.  infrun will stop all threads to step over breakpoints inline
>> if displaced stepping is not supported.  Are you copying this from elsewhere?  Guess a bit
>> of spring cleaning is in order if so.
> 
> Ok.  So we just put nothing, and if the target doesn't support non-stop,
> GDB outputs "The target does not support running in non-stop mode." and
> mi_run_cmd returns -1?

That's how the CLI tests work, at least.

> 
>>> +    mi_gdb_test "-file-exec-and-symbols --thread-group i2 $::binfile" \
>>> +	"\\^done" \
>>> +	"set executable of inferior 2"
>>> +    # Run second inferior to all_threads_started (to ensure all threads are
>>> +    # started) and resume it.
>>> +    mi_gdb_test "-exec-run \
>>> +	--thread-group i2" \
>>> +	"\\^running.*" "run inferior 2"
>>
>> Note this will fail on gdb builds that do not include a native target, which is
>> most "--target foo" builds.
> 
> I don't think so, because inferior 2 is using the remote target, which
> can run.  Note that the formatting above was erroneous, the line is
> broken at the wrong place, I've fixed it locally.

OK.


More information about the Gdb-patches mailing list