Re: [PATCH 02/23] Don't rely on inferior_ptid in record_full_wait

Tom Tromey
2020-08-01T20:47:58Z

>>>>> "John" == John Baldwin <jhb@FreeBSD.org> writes:

John> Arguably though inf-ptrace.c should not return null_ptid that later
John> triggers an obscure assertion failure, but instead it should probably
John> just die with an explicit error() or the like.

I thought about this approach, but target_wait's intro comment says:

Note that it is
_NOT_ OK to throw_exception() out of target_wait() without popping
the debugging target from the stack; GDB isn't prepared to get back
to the prompt with a debugging target but without the frame cache,
stop_pc, etc., set up.

However, parts of this are obsolete, so maybe the entire thing is.

John> It's not really clear
John> to me that we should be trying to do anything to gracefully handle an
John> ENOCHILD error.

Yeah, it does seem like kernel bug territory.

Tom