From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3 21/29] Share handle_exception
Date: Wed, 15 Apr 2020 10:54:39 -0600 [thread overview]
Message-ID: <87tv1kadv4.fsf@tromey.com> (raw)
In-Reply-To: <33cddd77-b9c5-dfaa-78cb-2812016b07fd@simark.ca> (Simon Marchi's message of "Wed, 15 Apr 2020 11:27:35 -0400")
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> This patch introduced some GDB-specific calls in nat/windows-nat.c. That
Simon> file is built by gdbserver, so it breaks that build. This is when building
Simon> on Cygwin:
For reasons I don't really understand, I can't seem to do a Cygwin
build. (And, I have little control over the Windows machines I do have
access to, so I can't really fix the problem, whatever it is.)
So, could you try this patch?
Tom
commit f4258cb31d8f39bb3779f31f55bab3de55556497
Author: Tom Tromey <tromey@adacore.com>
Date: Wed Apr 15 10:53:04 2020 -0600
Fix Cygwin gdb build
Simon pointed out that the windows-nat sharing series broke the Cygwin
build. This patch fixes the problem, by moving some globals into
nat/windows-nat.c.
gdb/ChangeLog
2020-04-15 Tom Tromey <tromey@adacore.com>
* windows-nat.c (cygwin_exceptions, cygwin_load_start)
(cygwin_load_end): Move to nat/windows-nat.c.
* nat/windows-nat.h (cygwin_exceptions, cygwin_load_start)
(cygwin_load_end): Move definitions from windows-nat.c.
* nat/windows-nat.c (cygwin_exceptions, cygwin_load_start)
(cygwin_load_end): Declare.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 425c4459922..c82d8e7ff40 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2020-04-15 Tom Tromey <tromey@adacore.com>
+
+ * windows-nat.c (cygwin_exceptions, cygwin_load_start)
+ (cygwin_load_end): Move to nat/windows-nat.c.
+ * nat/windows-nat.h (cygwin_exceptions, cygwin_load_start)
+ (cygwin_load_end): Move definitions from windows-nat.c.
+ * nat/windows-nat.c (cygwin_exceptions, cygwin_load_start)
+ (cygwin_load_end): Declare.
+
2016-01-20 Jon Turney <jon.turney@dronecode.org.uk>
* windows-nat.c (windows_make_so): Warn rather than stopping with
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c
index cd7c1d177c6..a5e367496e8 100644
--- a/gdb/nat/windows-nat.c
+++ b/gdb/nat/windows-nat.c
@@ -45,6 +45,18 @@ EXCEPTION_RECORD siginfo_er;
bool ignore_first_breakpoint = false;
#endif
+#ifdef __CYGWIN__
+
+/* When true, break when an exception is detected in the Cygwin DLL
+ itself. */
+bool cygwin_exceptions = false;
+
+/* The starting and ending address of the cygwin1.dll text segment. */
+CORE_ADDR cygwin_load_start;
+CORE_ADDR cygwin_load_end;
+
+#endif /* __CYGWIN__ */
+
/* Note that 'debug_events' must be locally defined in the relevant
functions. */
#define DEBUG_EVENTS(x) if (debug_events) debug_printf x
diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h
index aea1519672d..0c103cb867f 100644
--- a/gdb/nat/windows-nat.h
+++ b/gdb/nat/windows-nat.h
@@ -210,6 +210,18 @@ extern EXCEPTION_RECORD siginfo_er;
extern bool ignore_first_breakpoint;
#endif
+#ifdef __CYGWIN__
+
+/* When true, break when an exception is detected in the Cygwin DLL
+ itself. */
+extern bool cygwin_exceptions;
+
+/* The starting and ending address of the cygwin1.dll text segment. */
+extern CORE_ADDR cygwin_load_start;
+extern CORE_ADDR cygwin_load_end;
+
+#endif /* __CYGWIN__ */
+
/* Return the name of the DLL referenced by H at ADDRESS. UNICODE
determines what sort of string is read from the inferior. Returns
the name of the DLL, or NULL on error. If a name is returned, it
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 613153bfac6..a4e15ee7a32 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -162,9 +162,6 @@ static Wow64GetThreadSelectorEntry_ftype *Wow64GetThreadSelectorEntry;
# define bad_GetModuleFileNameEx bad_GetModuleFileNameExA
#else
# define __PMAX PATH_MAX
-/* The starting and ending address of the cygwin1.dll text segment. */
- static CORE_ADDR cygwin_load_start;
- static CORE_ADDR cygwin_load_end;
# define __USEWIDE
typedef wchar_t cygwin_buf_t;
typedef DWORD WINAPI (GetModuleFileNameEx_ftype) (HANDLE, HMODULE,
@@ -239,9 +236,6 @@ static bool wow64_process = false;
/* User options. */
static bool new_console = false;
-#ifdef __CYGWIN__
-static bool cygwin_exceptions = false;
-#endif
static bool new_group = true;
static bool debug_exec = false; /* show execution */
static bool debug_events = false; /* show events from kernel */
next prev parent reply other threads:[~2020-04-15 16:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 19:08 [PATCH v3 00/29] Windows code sharing + bug fix Tom Tromey
2020-03-13 19:08 ` [PATCH v3 01/29] Remove the "next" field from windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 02/29] Rename win32_thread_info to windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 03/29] Rename windows_thread_info::id to "tid" Tom Tromey
2020-03-13 19:08 ` [PATCH v3 04/29] Share windows_thread_info between gdb and gdbserver Tom Tromey
2020-03-13 19:08 ` [PATCH v3 05/29] Use new and delete for windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 06/29] Change two windows_thread_info members to "bool" Tom Tromey
2020-03-13 19:08 ` [PATCH v3 07/29] Make windows_thread_info::name a unique_xmalloc_ptr Tom Tromey
2020-03-13 19:08 ` [PATCH v3 08/29] Use lwp, not tid, for Windows thread id Tom Tromey
2020-03-13 19:08 ` [PATCH v3 09/29] Share Windows thread-suspend and -resume code Tom Tromey
2020-03-13 19:08 ` [PATCH v3 10/29] Change type of argument to windows-nat.c:thread_rec Tom Tromey
2020-03-13 19:08 ` [PATCH v3 11/29] Handle pending stops from the Windows kernel Tom Tromey
2020-03-13 19:08 ` [PATCH v3 12/29] Call CloseHandle from ~windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 13/29] Wrap shared windows-nat code in windows_nat namespace Tom Tromey
2020-03-13 19:08 ` [PATCH v3 14/29] Share thread_rec between gdb and gdbserver Tom Tromey
2020-03-13 19:08 ` [PATCH v3 15/29] Share get_image_name " Tom Tromey
2020-03-13 19:08 ` [PATCH v3 16/29] Share some Windows-related globals Tom Tromey
2020-03-13 19:08 ` [PATCH v3 17/29] Normalize handle_output_debug_string API Tom Tromey
2020-03-13 19:08 ` [PATCH v3 18/29] Fix up complaints.h for namespace use Tom Tromey
2020-03-13 19:08 ` [PATCH v3 19/29] Share handle_load_dll and handle_unload_dll declarations Tom Tromey
2020-03-13 19:08 ` [PATCH v3 20/29] Remove some globals from windows-nat.c Tom Tromey
2020-03-13 19:08 ` [PATCH v3 21/29] Share handle_exception Tom Tromey
2020-04-15 15:27 ` Simon Marchi
2020-04-15 16:54 ` Tom Tromey [this message]
2020-04-15 17:54 ` Simon Marchi
2020-04-15 19:13 ` Tom Tromey
2020-04-16 0:52 ` Simon Marchi
2020-03-13 19:08 ` [PATCH v3 22/29] Share some inferior-related Windows code Tom Tromey
2020-03-13 19:08 ` [PATCH v3 23/29] Introduce fetch_pending_stop Tom Tromey
2020-03-13 19:08 ` [PATCH v3 24/29] Move wait_for_debug_event to nat/windows-nat.c Tom Tromey
2020-03-13 19:08 ` [PATCH v3 25/29] Make last_wait_event static Tom Tromey
2020-03-13 19:08 ` [PATCH v3 26/29] Add read_pc / write_pc support to win32-low Tom Tromey
2020-03-13 19:08 ` [PATCH v3 27/29] Introduce win32_target_ops::decr_pc_after_break Tom Tromey
2020-03-13 19:08 ` [PATCH v3 28/29] Implement stopped_by_sw_breakpoint for Windows gdbserver Tom Tromey
2020-03-13 19:08 ` [PATCH v3 29/29] Add pending stop support to gdbserver's Windows port Tom Tromey
2020-04-16 1:11 ` [pushed] gdbserver: fix format string warning in win32-low.cc (was: Re: [PATCH v3 29/29] Add pending stop support to gdbserver's Windows port) Simon Marchi
2020-04-08 20:33 ` [PATCH v3 00/29] Windows code sharing + bug fix Tom Tromey
2020-04-08 22:17 ` Hannes Domani
2020-04-09 2:49 ` Tom Tromey
2020-04-09 14:57 ` Jon Turney
2020-04-09 15:08 ` Hannes Domani
2020-04-09 17:54 ` 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=87tv1kadv4.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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