Re: [RFA/commit] GDB crash re-running program on Windows (native)

Joel Brobecker
2019-01-05T07:57:45Z

>>> gdb/ChangeLog:
>>>
>>> * thread.c (delete_thread_1): Add gdb_assert that THR is not
>>> NULL. Initialize tpprev to NULL instead of assigning it
>>> to NULL on the next statement.
>>> * windows-nat.c (windows_delete_thread): Remove check for
>>> main_thread_id before printing thread exit notifications.
>>> (get_windows_debug_event) <EXIT_THREAD_DEBUG_EVENT>:
>>> Remove thread ID check against main_thread_id.
>>> <CREATE_PROCESS_DEBUG_EVENT>: Remove call to
>>> windows_delete_thread.
>>> <EXIT_PROCESS_DEBUG_EVENT>: Add call to windows_delete_thread.

> Yes, thanks for the explanation, everything LGTM.

Thank you Simon; I just pushed the patch.

I am also happy to say that I have a patch for the secondary
suggestion of avoiding the thread creation/exit notification
for the main thread. I will let it run through our nightly testing
for a couple of days and send it here for review afterwards.

--
Joel