From: Jon Turney <jon.turney@dronecode.org.uk>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>,
Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH] Fix Cygwin build after 20489cca
Date: Sun, 12 Jun 2022 17:27:42 +0100 [thread overview]
Message-ID: <20220612162742.8105-1-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <20220407195606.1847158-3-tromey@adacore.com>
Update code under __CYGWIN__ which accesses inferior process information
which is now stored in windows_process_info rather than globals.
---
gdb/windows-nat.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 9705fa33cc2..553b9ba45ce 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -553,15 +553,15 @@ windows_nat_target::fetch_registers (struct regcache *regcache, int r)
if (th->reload_context)
{
#ifdef __CYGWIN__
- if (have_saved_context)
+ if (windows_process.have_saved_context)
{
/* Lie about where the program actually is stopped since
cygwin has informed us that we should consider the signal
to have occurred at another location which is stored in
"saved_context. */
- memcpy (&th->context, &saved_context,
+ memcpy (&th->context, &windows_process.saved_context,
__COPY_CONTEXT_SIZE);
- have_saved_context = 0;
+ windows_process.have_saved_context = 0;
}
else
#endif
@@ -749,9 +749,10 @@ windows_make_so (const char *name, LPVOID load_addr)
/* The symbols in a dll are offset by 0x1000, which is the
offset from 0 of the first byte in an image - because of the
file header and the section alignment. */
- cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *)
- load_addr + 0x1000);
- cygwin_load_end = cygwin_load_start + bfd_section_size (text);
+ windows_process.cygwin_load_start = (CORE_ADDR) (uintptr_t) ((char *)
+ load_addr + 0x1000);
+ windows_process.cygwin_load_end = windows_process.cygwin_load_start +
+ bfd_section_size (text);
}
#endif
@@ -1731,7 +1732,8 @@ windows_nat_target::do_initial_windows_stuff (DWORD pid, bool attaching)
i++)
windows_process.dr[i] = 0;
#ifdef __CYGWIN__
- cygwin_load_start = cygwin_load_end = 0;
+ windows_process.cygwin_load_start = 0;
+ windows_process.cygwin_load_end = 0;
#endif
windows_process.current_event.dwProcessId = pid;
memset (&windows_process.current_event, 0,
--
2.36.1
next prev parent reply other threads:[~2022-06-12 16:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 19:56 [PATCH 0/2] More Windows globals cleanups Tom Tromey
2022-04-07 19:56 ` [PATCH 1/2] Turn some windows-nat.c static functions into methods Tom Tromey
2022-04-07 19:56 ` [PATCH 2/2] Use subclasses of windows_process_info Tom Tromey
2022-06-12 16:27 ` Jon Turney [this message]
2022-11-02 14:39 ` [PATCH] Fix Cygwin build after 20489cca Jon Turney
2022-06-12 16:28 ` [PATCH 2/2] Use subclasses of windows_process_info Jon Turney
2022-06-07 18:15 ` [PATCH 0/2] More Windows globals cleanups 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=20220612162742.8105-1-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/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).