From: Simon Marchi <simark@simark.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb] Remove unnecessary defs.h/common-defs.h includes
Date: Tue, 21 Apr 2026 13:09:39 -0400 [thread overview]
Message-ID: <80feb4e3-b105-4fd2-8d19-d59073602f00@simark.ca> (raw)
In-Reply-To: <20260421162454.1720072-1-tdevries@suse.de>
On 4/21/26 12:24 PM, Tom de Vries wrote:
> I asked an AI to review a patch that added a new file, and it mentioned I
> should add an include of defs.h as first include.
>
> That used to be true, but since commit 18d2988e5da ("gdb, gdbserver,
> gdbsupport: remove includes of early headers") that's not the case anymore.
>
> Error out when encountering a second include of defs.h, and remove a few of
> those.
>
> While we're at it, do the same for gdbsupport/common-defs.h.
>
> Tested by rebuilding gdb on aarch64-linux.
server.h in gdbserver is the same idea. I see one include in
linux-microblaze-low.cc that should be removed.
I would suggest changing the error message to something clearer and more
actionable for those who might not know the backstory of these files,
perhaps:
# error gdb/defs.h should not be included manually
Simon
next prev parent reply other threads:[~2026-04-21 17:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 16:24 Tom de Vries
2026-04-21 17:09 ` Simon Marchi [this message]
2026-04-21 19:44 ` Tom de Vries
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=80feb4e3-b105-4fd2-8d19-d59073602f00@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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