This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/commit] (Windows) remove thread notification for main thread of inferior


Hi Joel,

I didn't test, but this looks good to me.  Two small comments below.

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 2894b208f58..ae05d889a6a 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -426,9 +426,17 @@ thread_rec (DWORD id, int get_context)
   return NULL;
 }

-/* Add a thread to the thread list.  */
+/* Add a thread to the thread list.
+
+   PTID is the ptid of the thread to be deleted.
+   H is its Windows handle.
+   TLB is its thread local base.
+   MAIN_THREAD_P should be true if the thread to be deleted is
+   the main thread, false otherwise.  */

This comment about the function that adds threads talks about things to be deleted.

+
 static windows_thread_info *
-windows_add_thread (ptid_t ptid, HANDLE h, void *tlb)
+windows_add_thread (ptid_t ptid, HANDLE h, void *tlb,
+		    bool main_thread_p = false)

Just a nit: in this case, where there are very few callers to update, I would opt for not using a default parameter value. It's probably just a personal preference, but I find it clearer to have the explicit value at the call site.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]