From: Alexander Richardson via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: Nick Clifton <nickc@redhat.com>,
gdb-patches@sourceware.org, Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] GDB: Fix detection of ELF support when configuring with -Werror
Date: Fri, 20 Nov 2020 01:12:43 +0000 [thread overview]
Message-ID: <CAEeofcjJ3sPbwWeW8fwHJGfJoPqu9Hd5pBYO3w8z=gyTstiQZw@mail.gmail.com> (raw)
In-Reply-To: <ddae31ca-6358-c77d-819b-2c7cdd6a51ff@simark.ca>
On Fri, 13 Nov 2020 at 13:46, Simon Marchi <simark@simark.ca> wrote:
>
>
> On 2020-11-13 7:09 a.m., Nick Clifton wrote:
> > Hi Simon,
> >
> >>> that's what I originally planned, but it seems like elf-bfd.h (and the
> >>> headers it includes) don't include any system headers. Since I'm not
> >>> familiar with any of this code I assumed this was intentional.
> >>>
> >>> Alex
> >>>
> >>
> >> Hi binutils@,
> >>
> >> Could you check the discussion above? Is there a reason elf-bfd.h
> >> doesn't include the header file it needs to use the functions it uses?
> >
> > Essentially this is because elf-bfd.h is internal to the binutils
> > sources, and not expected to be used elsewhere. So any code that
> > includes it is also expected to include the sysdep.h header which
> > does then include the needed system headers.
> >
> > The idea is that all of the configuration time decisions about which
> > system headers to include are confined to one file - sysdep.h - rather
> > than having to be copied into all header files.
> >
> > Cheers
> > Nick
> >
> >
>
> Ah ok I remember this, we started discussing this in:
>
> https://sourceware.org/pipermail/gdb-patches/2020-September/172041.html
>
> In an ideal world, GDB would stop using BFD's internal functions. But
> for this, BFD would need to expose some ELF-specific bits, such as
> program headers. I don't know if this is against BFD's design
> principles to abstract things across various executable formats.
>
> I think Alexander's patch is fine, I don't think the complexity of the
> patch linked above is necessary. Are there even any systems today that
> GDB supports for which strncmp isn't found in string.h?
>
> Alexander, may I ask what particular configuration you are using? It
> would be good to document it in the commit log.
>
Hi Simon,
I was configuring GDB with -Werror=implicit-function-definition in
CFLAGS and the --disable-werror configure argument.
I've dropped that flag from my build scripts for now, but I would like
to add it again if this patch is accepted.
Thanks,
Alex
next prev parent reply other threads:[~2020-11-20 1:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 9:20 Alex Richardson via Gdb-patches
2020-11-11 20:48 ` Simon Marchi
2020-11-12 9:25 ` Alexander Richardson via Gdb-patches
2020-11-12 14:23 ` Tom Tromey
2020-11-12 14:25 ` Simon Marchi
2020-11-13 12:09 ` Nick Clifton via Gdb-patches
2020-11-13 13:46 ` Simon Marchi
2020-11-20 1:12 ` Alexander Richardson via Gdb-patches [this message]
2020-11-20 15:54 ` Tom Tromey
2020-11-28 16:50 ` 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='CAEeofcjJ3sPbwWeW8fwHJGfJoPqu9Hd5pBYO3w8z=gyTstiQZw@mail.gmail.com' \
--to=gdb-patches@sourceware.org \
--cc=Alexander.Richardson@cl.cam.ac.uk \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
--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