From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 6C42F3945060; Wed, 8 Apr 2020 20:49:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C42F3945060 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Rename windows_thread_info::id to "tid" X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: e56f8ccb07890fc2c0413c530d27d105c74f622c X-Git-Newrev: 55a1e039f9d5e2ae144b64f52f2034e4f9177336 Message-Id: <20200408204934.6C42F3945060@sourceware.org> Date: Wed, 8 Apr 2020 20:49:34 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 20:49:34 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=55a1e039f9d5e2ae144b64f52f2034e4f9177336 commit 55a1e039f9d5e2ae144b64f52f2034e4f9177336 Author: Tom Tromey Date: Wed Apr 8 14:33:35 2020 -0600 Rename windows_thread_info::id to "tid" This changes the name of a field in windows_thread_info, bringing gdb and gdbserver closer into sync. gdb/ChangeLog 2020-04-08 Tom Tromey * windows-nat.c (struct windows_thread_info) : Rename from "id". (thread_rec, windows_add_thread, windows_delete_thread) (windows_continue): Update. Diff: --- gdb/ChangeLog | 6 ++++++ gdb/windows-nat.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1ab9f476e99..1c46aafadd2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-04-08 Tom Tromey + + * windows-nat.c (struct windows_thread_info) : Rename from "id". + (thread_rec, windows_add_thread, windows_delete_thread) + (windows_continue): Update. + 2020-04-08 Tom Tromey * windows-nat.c (struct windows_thread_info): Remove typedef. diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 2f9e00a0a9a..837359e9786 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__