From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3SiZEJnZgWFhKwAAWB0awg (envelope-from ) for ; Tue, 02 Nov 2021 20:36:41 -0400 Received: by simark.ca (Postfix, from userid 112) id 32A161F0C1; Tue, 2 Nov 2021 20:36:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8D3D61E940 for ; Tue, 2 Nov 2021 20:36:40 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B46EF385840D for ; Wed, 3 Nov 2021 00:36:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B46EF385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635899799; bh=L7za8Cz9u2x9bf8oj0rMcbesaJpdaWnv4Y2NhTanIKs=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RVJbz/dj33fG8mffDCI/9k6rQpIZMpAf2pJnGjsJP5RG1vXFq+5IRuN4HZHK3bQYg 8yUHKggmZz1BTXLT0blwZnUhHG0bSBTVyVtaWIHiL6VW8TgHmLDksf+q+h05eUiPno VXQnxNdq37FSzsOw5aqgYfMalyZCo3oICJOt4MjA= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 0ABAE3858C27 for ; Wed, 3 Nov 2021 00:36:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0ABAE3858C27 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 1A30Zw45024531 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 2 Nov 2021 20:36:03 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1A30Zw45024531 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 936E71E940; Tue, 2 Nov 2021 20:35:58 -0400 (EDT) Message-ID: <5d939c89-8816-50da-dc75-75869543c38f@polymtl.ca> Date: Tue, 2 Nov 2021 20:35:58 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: gdb 11.1: struct inf lacks two members Content-Language: en-US To: Andrea Monaco , gdb@sourceware.org References: <87h7cudufq.fsf@autistici.org> In-Reply-To: <87h7cudufq.fsf@autistici.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 3 Nov 2021 00:35:58 +0000 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 2021-11-02 19:11, Andrea Monaco via Gdb wrote: > > Hello, > > > after a successful configure, gdb 11.1 fails to make in my GNU/Hurd > system with the following errors: > > > CXX gnu-nat.o > gnu-nat.c: In member function 'virtual void gnu_nat_target::create_inferior(const char*, const string&, char**, int)': > gnu-nat.c:2117:13: error: 'struct inf' has no member named 'target_is_pushed' > 2117 | if (!inf->target_is_pushed (this)) > | ^~~~~~~~~~~~~~~~ > gnu-nat.c:2118:10: error: 'struct inf' has no member named 'push_target' > 2118 | inf->push_target (this); > | ^~~~~~~~~~~ > > > and some others follow. I found out that struct inf (from gnu-nat.c) is > only defined in the GNU/Hurd target, but it lacks the target_is_pushed > and push_target members which are part of class inferior (from > inferior.h). Is this a syntax error? > > > > Let me know, > > Andrea Monaco > Oh, my bad I think. This should use the "inferior" variable, not inf. As you mentioned, there's a "struct inf" type only defined in gnu-nat, and I got confused with the two similar variables. The change below should fix it, can you confirm? diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 54838347f947..13afb3ed8b01 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2108,8 +2108,8 @@ gnu_nat_target::create_inferior (const char *exec_file, inf_debug (inf, "creating inferior"); - if (!inf->target_is_pushed (this)) - inf->push_target (this); + if (!inferior->target_is_pushed (this)) + inferior->push_target (this); pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me, NULL, NULL, NULL, NULL);