From: Christian Biesinger <cbiesinger@google.com>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][gdbserver] Add missing include of gdbsupport/agent.h
Date: Fri, 19 Jun 2020 15:22:42 -0500 [thread overview]
Message-ID: <CAPTJ0XF0dd1Af5OMUTJWn49PxFp9OYd26V786nzTCu50r8SLAw@mail.gmail.com> (raw)
In-Reply-To: <131a6f7c-26f1-1012-32e3-2582e3c6d7f8@suse.de>
On Thu, Jun 18, 2020 at 3:44 AM Tom de Vries <tdevries@suse.de> wrote:
>
> [ was: Re: [committed][gdbserver] Fix Wlto-type-mismatch for debug_agent ]
> On 6/17/20 6:38 PM, Tom de Vries wrote:
> > On 6/12/20 8:19 PM, Christian Biesinger wrote:
> >> On Fri, Jun 12, 2020 at 11:37 AM Tom de Vries <tdevries@suse.de> wrote:
> >>>
> >>> Hi,
> >>>
> >>> When building gdb including gdbserver with CFLAGS/CXXFLAGS -O2 -g -flto=auto,
> >>> I run into:
> >>> ...
> >>> src/gdbserver/../gdbsupport/agent.h:47:13: error: type of 'debug_agent' \
> >>> does not match original declaration [-Werror=lto-type-mismatch]
> >>> extern bool debug_agent;
> >>> ^
> >>> src/gdbserver/ax.cc:28:5: note: type 'int' should match type 'bool'
> >>> int debug_agent = 0;
> >>> ^
> >>> src/gdbserver/ax.cc:28:5: note: 'debug_agent' was previously declared here
> >>> src/gdbserver/ax.cc:28:5: note: code may be misoptimized unless \
> >>> -fno-strict-aliasing is used
> >>
> >> So it sounds like this didn't come up before because ax.cc doesn't
> >> include gdbsupport/agent.h?
> >
> > Yes.
> >
> >> It probably should?
> >
> > Um, good point, thanks.
> >
> > Though ax.h does:
> > ...
> > #ifdef IN_PROCESS_AGENT
> > #define debug_threads debug_agent
> > #endif
> > ...
> > so I wonder if we should have the include there instead. I'll try to
> > test this.
>
> Any comments?
Looks good to me (but I'm not a maintainer)
prev parent reply other threads:[~2020-06-19 20:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 16:37 [committed][gdbserver] Fix Wlto-type-mismatch for debug_agent Tom de Vries
2020-06-12 18:19 ` Christian Biesinger
2020-06-17 16:38 ` Tom de Vries
2020-06-18 8:44 ` [PATCH][gdbserver] Add missing include of gdbsupport/agent.h Tom de Vries
2020-06-19 20:22 ` Christian Biesinger [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=CAPTJ0XF0dd1Af5OMUTJWn49PxFp9OYd26V786nzTCu50r8SLAw@mail.gmail.com \
--to=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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