Re: [pushed] Fix gdbserver/MI testing regression

Simon Marchi
2016-07-04T17:22:21Z

On 16-06-30 07:12 AM, Pedro Alves wrote:
> On 06/29/2016 11:50 AM, Pedro Alves wrote:
>> On 06/28/2016 09:19 PM, Simon Marchi wrote:
>>> I added a few traces to understand what's happening, and it seems that inferior_spawn_id
>>> is being unset at two places:
>
> Indeed.
>
>>> The easy way would be to add a "info exists" check before unsetting it, but I don't know if
>>> that would only hide a real problem.
>
> I went ahead and pushed the patch below, with takes an even easier route.
>
> I think we'll need to do something better in at least a couple scenarios:
>
> - If/when gdbserver learns about "set inferior-tty", the separate
> inferior tty spawn id should be used instead of gdbserver's. gdbserver
> doesn't support that, so in tests that use that (or MI's equivalent),
> inferior output indeed is sent to gdbserver's tty.
>
> - Tests that disconnect from gdbserver/restart gdb/reconnect to gdbserver
> should end up inferior_spawn_id set to gdbserver's spawn id,
> otherwise tests that rely on inferior I/O, after the reconnect won't work
> properly. I think there's no such test currently, though, so I'm ignoring
> this for now.

Thanks! Your patch fixes the problem I initially encountered.

Simon