From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>, Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] gdb: add IWYU export pragams to gdb_curses.h
Date: Fri, 7 Jun 2024 23:07:38 -0400 [thread overview]
Message-ID: <de618757-fc81-48bd-8003-13cc5620e29b@efficios.com> (raw)
In-Reply-To: <87frtuqdlz.fsf@tromey.com>
On 2024-06-03 10:56, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> From: Simon Marchi <simon.marchi@efficios.com>
> Simon> It seems like gdb_curses.h is included whenever we want to access
> Simon> ncurses functionality, instead of including directly ncurses.h. As a
> Simon> result, clangd often erroneously shows that gdb_curses.h inclusions are
> Simon> unused.
>
> Simon> By adding those pragmas, clangd (and the include-what-you-use tool)
> Simon> understands that gdb_curses.h is a valid provider for whatever these
> Simon> ncurses.h files provide.
>
> I wish this were less ugly, but anyway it's ok.
> Approved-By: Tom Tromey <tom@tromey.com>
I don't really know how they could be made less ugly... but at least
they seem to work fine.
> This isn't the only place this idiom is used in gdb, not to mention
> gnulib, which basically only exists to do this.
So far I didn't hit any problem like this with gnulib, hopefully it
stays that way.
Simon
next prev parent reply other threads:[~2024-06-08 3:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 2:54 [PATCH 1/3] gdb/tui: change some macros to functions Simon Marchi
2024-05-31 2:54 ` [PATCH 2/3] gdb: add IWYU export pragams to gdb_curses.h Simon Marchi
2024-06-03 14:56 ` Tom Tromey
2024-06-08 3:07 ` Simon Marchi [this message]
2024-05-31 2:54 ` [PATCH 3/3] gdb/tui: cleanup includes Simon Marchi
2024-06-03 14:57 ` Tom Tromey
2024-06-08 10:14 ` Tom de Vries
2024-06-09 14:14 ` Simon Marchi
2024-06-10 8:44 ` Tom de Vries
2024-06-12 4:29 ` Aditya Kamath1
2024-06-09 5:51 ` Aditya Kamath1
2024-06-03 14:55 ` [PATCH 1/3] gdb/tui: change some macros to functions 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=de618757-fc81-48bd-8003-13cc5620e29b@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
--cc=tom@tromey.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).