From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [pushed] gdb: fix include for gdb_signal in target/waitstatus.h
Date: Fri, 19 Apr 2024 16:08:55 -0400 [thread overview]
Message-ID: <20240419200856.2291305-1-simon.marchi@polymtl.ca> (raw)
clangd tells me that the gdb_signals.h include in target/waitstatus.h is
unused. This include was probably to give access to `enum gdb_signal`,
but this is in fact defined in gdb/signals.h. Change the include to
gdb/signals.h. Include gdbsupport/gdb_signals.h in some files that were
relying on the transitive include.
Change-Id: I6f4361b3d801394bf29abe8c1393aff110aa0ad6
---
gdb/nat/fork-inferior.c | 1 +
gdb/target/waitstatus.c | 1 +
gdb/target/waitstatus.h | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index a5900fe4ee8f..4378177bc8c4 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -26,6 +26,7 @@
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/signals-state-save-restore.h"
#include "gdbsupport/gdb_tilde_expand.h"
+#include "gdbsupport/gdb_signals.h"
#include <vector>
extern char **environ;
diff --git a/gdb/target/waitstatus.c b/gdb/target/waitstatus.c
index 30c0621326fd..9e9b5633b12d 100644
--- a/gdb/target/waitstatus.c
+++ b/gdb/target/waitstatus.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "waitstatus.h"
+#include "gdbsupport/gdb_signals.h"
/* See waitstatus.h. */
diff --git a/gdb/target/waitstatus.h b/gdb/target/waitstatus.h
index dce1a7f3175e..7d5ad3f97769 100644
--- a/gdb/target/waitstatus.h
+++ b/gdb/target/waitstatus.h
@@ -21,7 +21,7 @@
#define TARGET_WAITSTATUS_H
#include "diagnostics.h"
-#include "gdbsupport/gdb_signals.h"
+#include "gdb/signals.h"
/* Stuff for target_wait. */
base-commit: ebb8507cee4edcb6b355a04159a4d4822f756e1c
--
2.44.0
next reply other threads:[~2024-04-19 20:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 20:08 Simon Marchi [this message]
2024-04-19 20:21 ` Tom Tromey
2024-04-23 3:18 ` Simon Marchi
2024-04-23 3:30 ` 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=20240419200856.2291305-1-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--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).