Re: [RFA 1/2][master+8.3] (Windows) fix thr != nullptr assert failure in delete_thread_1

Pedro Alves
2019-04-18T15:04:28Z

On 4/18/19 3:52 PM, Pedro Alves wrote:

>> @@ -1637,11 +1629,11 @@ get_windows_debug_event (struct target_ops *ops,
>> else if (saw_create == 1)
>> {
>> windows_delete_thread (ptid_t (current_event.dwProcessId, 0,
>> - main_thread_id),
>> - 0, true /* main_thread_p */);
>> + current_event.dwThreadId),
>> + 0);
>> ourstatus->kind = TARGET_WAITKIND_EXITED;
>> ourstatus->value.integer = current_event.u.ExitProcess.dwExitCode;
>> - thread_id = main_thread_id;
>> + thread_id = current_event.dwThreadId;
>> }
>> break;
>
> This looks right.

I forgot to add: reading this made me wonder -- what about gdbserver?
I looked, and while gdbserver/win32-low.c had an equivalent of main_thread_id,
it doesn't use it for EXIT_PROCESS_DEBUG_EVENT either.

Thanks,
Pedro Alves