From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by sourceware.org (Postfix) with ESMTPS id DEBA73858D34 for ; Fri, 19 Jun 2020 20:23:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DEBA73858D34 Received: by mail-qt1-x843.google.com with SMTP id z1so8212777qtn.2 for ; Fri, 19 Jun 2020 13:23:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j06iG0VK3U1Q87m1fw1WEGN/DHyrKP3/W4QdLgQCBAs=; b=R3cir0o0qDm50a2MJIyGoLcRTsDQIZTwaE9ZXiIHQxQ+HB2egHBxiPfVI8zTQGCK/a S6US/X79jvDqr09imlQQJ3URl4ZzCjsGzO/WkjhYvE+OtVOM1qBLJITtfB3rEI2XpZJE lhaLvSODeGDTlVhqRsYAZGog5eoq0kRXbT1ns4o/DVTr5dYxyr0N8VlE4c75W9VtwTJx 9whuGO+1Rvv7Ag/szvb29H/T43WvGvJ+p3AkuZ9ihLsycioDiOYzcITvEUE2U6EgAT/q oBZ58W1t01Bqdee5HrVG8cVJFj8XtC75nK9YX2lEM+SBIDHG67U22IsWZreC4gAPs/7g ZIEg== X-Gm-Message-State: AOAM530dgDCdN2bOdv3TOzxG76xRVAHpvVXkPqQcXp6Ey4htxg0xXarV 8fh0ZmfvRf1Abqm7ONKJPPV52vR+TggyOosDZcpsU4qn X-Google-Smtp-Source: ABdhPJxynOj4+b+2FFD4SkFTD7MfKG2wGi5p+fJC7ga46/gCjazpgvgoAf8cB+BboUzl0+EKQT+T9BBVs7f5/O8konM= X-Received: by 2002:ac8:5484:: with SMTP id h4mr2294135qtq.322.1592598199138; Fri, 19 Jun 2020 13:23:19 -0700 (PDT) MIME-Version: 1.0 References: <20200612163715.GA21612@delia> <1bc315c0-55e6-08bf-8aa3-e0e30bba2c81@suse.de> <131a6f7c-26f1-1012-32e3-2582e3c6d7f8@suse.de> In-Reply-To: <131a6f7c-26f1-1012-32e3-2582e3c6d7f8@suse.de> From: Christian Biesinger Date: Fri, 19 Jun 2020 15:22:42 -0500 Message-ID: Subject: Re: [PATCH][gdbserver] Add missing include of gdbsupport/agent.h To: Tom de Vries Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 20:23:21 -0000 On Thu, Jun 18, 2020 at 3:44 AM Tom de Vries 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 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)