From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id 45663394B003 for ; Fri, 13 Mar 2020 19:08:58 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2628D561B6; Fri, 13 Mar 2020 15:08:58 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 9k0rIeyLzWVL; Fri, 13 Mar 2020 15:08:58 -0400 (EDT) Received: from murgatroyd.Home (184-96-250-69.hlrn.qwest.net [184.96.250.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id D7995561B0; Fri, 13 Mar 2020 15:08:57 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v3 03/29] Rename windows_thread_info::id to "tid" Date: Fri, 13 Mar 2020 13:08:29 -0600 Message-Id: <20200313190855.28662-4-tromey@adacore.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200313190855.28662-1-tromey@adacore.com> References: <20200313190855.28662-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-25.0 required=5.0 tests=GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 19:08:58 -0000 This changes the name of a field in windows_thread_info, bringing gdb and gdbserver closer into sync. gdb/ChangeLog 2020-03-13 Tom Tromey * windows-nat.c (struct windows_thread_info) : Rename from "id". (thread_rec, windows_add_thread, windows_delete_thread) (windows_continue): Update. --- gdb/ChangeLog | 6 ++++++ gdb/windows-nat.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 8b993912713..69930b00a11 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -248,7 +248,7 @@ static enum gdb_signal last_sig = GDB_SIGNAL_0; not available in gdb's thread structure. */ struct windows_thread_info { - DWORD id; + DWORD tid; HANDLE h; CORE_ADDR thread_local_base; char *name; @@ -429,7 +429,7 @@ static windows_thread_info * thread_rec (DWORD id, int get_context) { for (windows_thread_info *th : thread_list) - if (th->id == id) + if (th->tid == id) { if (!th->suspended && get_context) { @@ -487,7 +487,7 @@ windows_add_thread (ptid_t ptid, HANDLE h, void *tlb, bool main_thread_p) return th; th = XCNEW (windows_thread_info); - th->id = id; + th->tid = id; th->h = h; th->thread_local_base = (CORE_ADDR) (uintptr_t) tlb; #ifdef __x86_64__ @@ -594,7 +594,7 @@ windows_delete_thread (ptid_t ptid, DWORD exit_code, bool main_thread_p) auto iter = std::find_if (thread_list.begin (), thread_list.end (), [=] (windows_thread_info *th) { - return th->id == id; + return th->tid == id; }); if (iter != thread_list.end ()) @@ -1477,7 +1477,7 @@ windows_continue (DWORD continue_status, int id, int killed) "DBG_CONTINUE" : "DBG_EXCEPTION_NOT_HANDLED")); for (windows_thread_info *th : thread_list) - if ((id == -1 || id == (int) th->id) + if ((id == -1 || id == (int) th->tid) && th->suspended) { #ifdef __x86_64__ -- 2.21.1