Re: Solaris - procfs: couldn't find pid 32748 (kernel thread 21) in procinfo list

Pedro Alves
2020-06-01T19:12:12Z

On 6/1/20 12:39 PM, Petr Sumbera via Gdb wrote:
> The issue seems to be that the LWP exits and the status->kind is set to TARGET_WAITKIND_SPURIOUS:
>
> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/procfs.c;h=f6c6b0e71c16224d3e7345ca09e011cdcf06349a;hb=HEAD#l2214
>
> But instantly it's added into the list again here:
>
> https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/infrun.c;h=95fc3bfe45930b53c33cb4de165db9c070449ad8;hb=HEAD#l5200
>
> But there is no longer such LWP in /proc.
>
> Any suggestion?

Either:

- replace TARGET_WAITKIND_SPURIOUS with TARGET_WAITKIND_THREAD_EXITED, or,

- replace
status->kind = TARGET_WAITKIND_SPURIOUS;
return retval;
with
goto wait_again;
instead.

Thanks,
Pedro Alves