[PATCH] New testcase gdb.threads/leader-exit-attach.exp (PR threads/8153)

Pedro Alves pedro@palves.net
Tue Mar 26 19:27:51 GMT 2024


On 2024-03-26 15:26, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:
> 
> Pedro> Here's said testcase.  Only two decades between original fix and testcase,
> Pedro> not too bad.  :-)
> 
> Does this mean that the phony process stuff is needed and so it should
> be ported to gdbserver as well?

At least on Windows 10, it isn't needed.  The jury is still out on whether it is needed on any Windows version we claim to support (Windows XP and up).
I was hoping we could drop all that hacky stuff from gdb instead of adding it to gdbserver.

I can't run Cygwin tests against gdbserver atm for the some reason I can't explain, but if I try it manually, GDBserver attaches to the process just fine.

If I run the new test on native Cygwin with this:

 --- c/gdb/windows-nat.c
 +++ w/gdb/windows-nat.c
 @@ -1360,6 +1360,8 @@ windows_nat_target::windows_continue (DWORD continue_status, int id,
  DWORD
  windows_nat_target::fake_create_process ()
  {
 +  gdb_assert (0);
 +

... it still passes.

I only tripped on the bad ptid in the phony process code path because I had a bug in the non-stop series that happened to result in that path being incorrectly taken.

Pedro Alves

> 
> Maybe we need another new bug.
> 
> Tom



More information about the Gdb-patches mailing list