Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb] Remove unnecessary defs.h/common-defs.h includes
Date: Tue, 21 Apr 2026 21:44:39 +0200	[thread overview]
Message-ID: <591de8bf-c34d-42c6-b9d1-94913dca8b3d@suse.de> (raw)
In-Reply-To: <80feb4e3-b105-4fd2-8d19-d59073602f00@simark.ca>

On 4/21/26 7:09 PM, Simon Marchi wrote:
> 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.
> 

Ack, added in a v2 ( 
https://sourceware.org/pipermail/gdb-patches/2026-April/226697.html ).

> 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

Also done in v2.

Thanks,
- Tom

      reply	other threads:[~2026-04-21 19:45 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
2026-04-21 19:44   ` Tom de Vries [this message]

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=591de8bf-c34d-42c6-b9d1-94913dca8b3d@suse.de \
    --to=tdevries@suse.de \
    --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