public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: gdb-patches@sourceware.org
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH 2/4] Fix Cygwin build after 0578e87f
Date: Sat, 21 May 2022 12:10:55 +0100	[thread overview]
Message-ID: <20220521111057.13089-3-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <20220521111057.13089-1-jon.turney@dronecode.org.uk>

Fix Cygwin build after 0578e87f ("Remove some globals from
nat/windows-nat.c").  Update code under ifdef __CYGWIN__ for globals
moved to members of struct windows_process_info.
---
 gdb/nat/windows-nat.c | 2 +-
 gdb/windows-nat.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c
index f6818015c53..ca6a529601e 100644
--- a/gdb/nat/windows-nat.c
+++ b/gdb/nat/windows-nat.c
@@ -198,7 +198,7 @@ windows_process_info::get_exec_module_filename (char *exe_name_ret,
        to POSIX format into the destination buffer.  */
     cygwin_buf_t *pathbuf = (cygwin_buf_t *) alloca (exe_name_max_len * sizeof (cygwin_buf_t));
 
-    len = GetModuleFileNameEx (current_process_handle,
+    len = GetModuleFileNameEx (handle,
 			       dh_buf, pathbuf, exe_name_max_len);
     if (len == 0)
       error (_("Error getting executable filename: %u."),
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 6c6dea84bfa..ab0efe72d8f 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -884,7 +884,7 @@ windows_nat::windows_process_info::handle_output_debug_string
 	  if (!retval)
 	    retval = current_event.dwThreadId;
 	  else if ((x = (LPCVOID) (uintptr_t) strtoull (p, NULL, 0))
-		   && ReadProcessMemory (current_process_handle, x,
+		   && ReadProcessMemory (handle, x,
 					 &saved_context,
 					 __COPY_CONTEXT_SIZE, &n)
 		   && n == __COPY_CONTEXT_SIZE)
-- 
2.36.1


  parent reply	other threads:[~2022-05-21 11:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21 11:10 [PATCH 0/4] Various Cygwin build fixes Jon Turney
2022-05-21 11:10 ` [PATCH 1/4] Fix Cygwin build after fcab5839 Jon Turney
2022-05-21 11:10 ` Jon Turney [this message]
2022-05-21 11:10 ` [PATCH 3/4] Fix Cygwin build after 85b25bd9 Jon Turney
2022-05-21 11:10 ` [PATCH 4/4] Fix a new warning on Cygwin Jon Turney
2022-05-26 16:55 ` [PATCH 0/4] Various Cygwin build fixes Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220521111057.13089-3-jon.turney@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).