[PATCH] gdb: restore thread after detaching from an inferior
Pedro Alves
pedro@palves.net
Thu Oct 22 15:35:56 GMT 2020
On 10/6/20 5:05 PM, Tankut Baris Aktemur via Gdb-patches wrote:
> The "detach inferiors N" command causes the current inferior to
> switch. E.g.:
>
> $ gdb a.out
> Reading symbols from a.out...
> (gdb) start
> ...
> (gdb) add-inferior
> [New inferior 2]
> Added inferior 2 on connection 1 (native)
> (gdb) inferior 2
> [Switching to inferior 2 [<null>] (<noexec>)]
> (gdb) info inferiors
> Num Description Connection Executable
> 1 process 18242 1 (native) /path/to/a.out
> * 2 <null> 1 (native)
> (gdb) detach inferiors 1
> Detaching from program: /path/to/a.out, process 18242
> [Inferior 1 (process 18242) detached]
> (gdb) info inferiors
> Num Description Connection Executable
> * 1 <null> /path/to/a.out
> 2 <null> 1 (native)
> (gdb)
This is:
https://sourceware.org/bugzilla/show_bug.cgi?id=19318
So I agree with your patch. But what about "kill inferior" ?
More information about the Gdb-patches
mailing list