From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 703AD385800E for ; Wed, 3 Nov 2021 19:12:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 703AD385800E X-ASG-Debug-ID: 1635966722-0c856e03878f1120001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id AoczF8J6lA16mbTg (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 03 Nov 2021 15:12:02 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from smarchi-efficios.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id 0040F441B21; Wed, 3 Nov 2021 15:12:01 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Andrea Monaco , Simon Marchi Subject: [pushed] gdb: fix gnu-nat build Date: Wed, 3 Nov 2021 15:12:01 -0400 X-ASG-Orig-Subj: [pushed] gdb: fix gnu-nat build Message-Id: <20211103191201.1099214-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1635966722 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 1758 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.93716 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-16.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 03 Nov 2021 19:12:14 -0000 When building gnu-nat.c, we get: 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); | ^~~~~~~~~~~ This is because of a confusion between the generic `struct inferior` variable and the gnu-nat-specific `struct inf` variable. Fix by referring to `inferior`, not `inf`. Adjust the comment on top of `struct inf` to clarify the purpose of that type. Co-Authored-By: Andrea Monaco Change-Id: I2fe2f7f6ef61a38d79860fd262b08835c963fc77 --- gdb/gnu-nat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 54838347f947..c6cecff06867 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -149,7 +149,7 @@ struct inf_wait int suppress; /* Something trivial happened. */ }; -/* The state of an inferior. */ +/* Further Hurd-specific state of an inferior. */ struct inf { /* Fields describing the current inferior. */ @@ -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); -- 2.26.2