Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christian Biesinger via Gdb-patches <gdb-patches@sourceware.org>
To: Kevin Buettner <kevinb@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [pushed] Fix aarch64-linux-hw-point.c build problem
Date: Thu, 25 Feb 2021 00:22:52 +0100	[thread overview]
Message-ID: <CAPTJ0XHeyn0xWaAyMZQ3G1cmyReQCmXpAMQuD-0UAWiH0V_MDg@mail.gmail.com> (raw)
In-Reply-To: <20210224145223.6052f41d@f33-m1.lan>

On Wed, Feb 24, 2021, 22:52 Kevin Buettner via Gdb-patches <
gdb-patches@sourceware.org> wrote:

> On Wed, 24 Feb 2021 13:52:00 -0700
> Tom Tromey <tom@tromey.com> wrote:
>
> > >>>>> "Kevin" == Kevin Buettner via Gdb-patches <
> gdb-patches@sourceware.org> writes:
> >
> > Kevin> gdb/ChangeLog:
> >
> > Kevin>        * nat/aarch64-linux-hw-point.c: Include <asm/ptrace.h>
> after
> > Kevin>        <sys/ptrace.h>.
> >
> > This seems reasonable, but a comment saying that the order matters might
> > be helpful later on.
>
> Agreed.
>
> I've pushed the following (along with a suitable ChangeLog entry)...
>

Since you said nat/aarch64-sve-linux-ptrace.h also includes these headers,
maybe add the comment there as well?



> diff --git a/gdb/nat/aarch64-linux-hw-point.c
> b/gdb/nat/aarch64-linux-hw-point.c
> index 0278ac2bb28..af2cc4254e2 100644
> --- a/gdb/nat/aarch64-linux-hw-point.c
> +++ b/gdb/nat/aarch64-linux-hw-point.c
> @@ -23,8 +23,15 @@
>  #include "aarch64-linux-hw-point.h"
>
>  #include <sys/uio.h>
> +
> +/* The order in which <sys/ptrace.h> and <asm/ptrace.h> are included
> +   can be important.  <sys/ptrace.h> often declares various PTRACE_*
> +   enums.  <asm/ptrace.h> often defines preprocessor constants for
> +   these very same symbols.  When that's the case, build errors will
> +   result when <asm/ptrace.h> is included before <sys/ptrace.h>.  */
>  #include <sys/ptrace.h>
>  #include <asm/ptrace.h>
> +
>  #include <elf.h>
>
>  /* Number of hardware breakpoints/watchpoints the target supports.
>
>

  reply	other threads:[~2021-02-24 23:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 19:59 Kevin Buettner via Gdb-patches
2021-02-24 20:52 ` Tom Tromey
2021-02-24 21:52   ` Kevin Buettner via Gdb-patches
2021-02-24 23:22     ` Christian Biesinger via Gdb-patches [this message]
2021-02-25 22:49       ` Kevin Buettner via Gdb-patches

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=CAPTJ0XHeyn0xWaAyMZQ3G1cmyReQCmXpAMQuD-0UAWiH0V_MDg@mail.gmail.com \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=kevinb@redhat.com \
    --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