Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simark@simark.ca>,
	Simon Marchi <simon.marchi@efficios.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] gdb, gdbserver, gdbsupport: include config.h files with -include
Date: Fri, 22 Mar 2024 15:43:23 +0000	[thread overview]
Message-ID: <2d9ba39d-317f-4c2d-bc1d-7236e886f55b@palves.net> (raw)
In-Reply-To: <13639831-3749-4d8d-83d1-dec2174320c0@simark.ca>

On 2024-03-22 15:08, Simon Marchi wrote:
> On 3/22/24 10:55, Simon Marchi wrote:> Ack, thanks!
>>
>> Simon
> 
> One question: files such as gdb/arch/arc.c currently include
> gdbsupport/common-defs.h, since they are compiled separately in the gdb
> and gdbserver context.  With my changes (even when I'll update my patch
> to take the approach you suggest), the gdb-compiled version will use
> `-include defs.h`, while the gdbserver-compiled version will use
> `-include server.h`.  Both defs.h and server.h include common-defs.h, so
> it works.  But is it a problem?  Should I modify the build system so
> that these shared files use `-include gdbsupport/common-defs.h`?

I think we can go either way at this point, I don't think it's a real problem unless
we move the files to gdbsupport/.  Using common-defs.h helps a little with avoiding adding
gdb-only or gdbserver-only code, but then OTOH, some of the files under gdb/arch/ already have
conditional compilation with #ifdef GDBSERVER, unfortunately, so we're not ready to move them
somewhere where they're compiled once.

> 
> Another (more involved) option would be to see if these files could get
> moved to gdbsupport.

Yeah.

  reply	other threads:[~2024-03-22 15:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 20:01 [PATCH 1/3] gdb, gdbserver, gdbsupport: reformat some Makefile variables, one entry per line Simon Marchi
2024-03-18 20:01 ` [PATCH 2/3] gdb, gdbserver, gdbsupport: include config.h files with -include Simon Marchi
2024-03-19 11:18   ` Hannes Domani
2024-03-19 12:22     ` Simon Marchi
2024-03-20 20:32   ` Pedro Alves
2024-03-21  2:11     ` Simon Marchi
2024-03-21 12:50       ` Pedro Alves
2024-03-21 13:02         ` Pedro Alves
2024-03-22 14:55         ` Simon Marchi
2024-03-22 15:08           ` Simon Marchi
2024-03-22 15:43             ` Pedro Alves [this message]
2024-03-18 20:01 ` [PATCH 3/3] gdbsupport: move more things to gdbsupport.inc.h Simon Marchi

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=2d9ba39d-317f-4c2d-bc1d-7236e886f55b@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=simon.marchi@efficios.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