From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id DniOCCSnBWZJvxkAWB0awg (envelope-from ) for ; Thu, 28 Mar 2024 13:21:40 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=freebsd.org header.i=@freebsd.org header.a=rsa-sha256 header.s=dkim header.b=Vgn3kaLL; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1349C1E0C0; Thu, 28 Mar 2024 13:21:40 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C9BE61E030 for ; Thu, 28 Mar 2024 13:21:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3BDF83858D3C for ; Thu, 28 Mar 2024 17:21:37 +0000 (GMT) Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id 450C93858D1E for ; Thu, 28 Mar 2024 17:21:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 450C93858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 450C93858D1E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=96.47.72.81 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711646477; cv=pass; b=IshF0ODK7lfVYaFN8ua3UDieEJWR6nvXMcdRU89n9U5z6mc/SQJcR64bJz59ipxuBxbUr+8re8qaKuSVsQbbc3gm9PHvmGs+QQ5l4iwqfS+of0QQ3+63rHZ8MU919ZmIMXOCfb76ZpNw9MkObozFQ/2yMkOXBhHq9eMsOeMhj2o= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711646477; c=relaxed/simple; bh=3tEOcr/wS6gyFYQyFvwpIsQii86rPpcIaLqMrfFwccU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Q66kEM1GPINFUsbAaHPqQ9yBRh4w/tGkxhFL0XwuqrgeYiAqbiLhIcRC6CZ5nlFvoGCk28kysX6aaL9bivOZ1pcYHLoC7wi0CvW5q2L4pYc9xSM4shMerYMA4dURTm67jq4rJh7uszMGfgq7XhJGsFgbjRFPL4o+WGY3Aeb+OgA= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4V59LL4Gdgz47dW; Thu, 28 Mar 2024 17:21:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V59LL3JF2z43Tb; Thu, 28 Mar 2024 17:21:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711646474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GvBbKLHH1lNnYwSHvc9YB99DslQyCsxBcyZm9f0CddU=; b=Vgn3kaLLtQLHSN6K4KZJVr7hLmP+itVeXiJc6T9AJKZPmUt/goUNoVuZWphMA+wz5SUEgM 48eRsMpke0cgqnxLSfj4dpa20ww8AyK+6o4USR2ExiHtOLapEOE6FeQd6ZprFnaQa3slP+ UsmIIEfYFAJyPh0MkJ/9hg5IOdy7ul5/OROY9F0SqL9X99GOnmV/DfPyLwn0oqEfGoJqaf SMQiUawwrCeS1NT2GY+o8Z+nD3VcO3KMa2JScrpGhBtHvz4ItbFgn0Xl/ISsveD13Txupj DKxlZcHd+BimjH3J/VtREndmOEHmAioR8u+etni51v/nS3ZIM+ntpwYg1meOrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711646474; a=rsa-sha256; cv=none; b=yewrksTSGaGCot2/4xsatfz+6qPL9wgfqPFeRXgIFjF+E++kxaeP1LP+jg+JH/ryU5Z6AQ n2C+Q/En77XJhUp8DTQsSHeEWRLkEWLsXrodozAdKK+gw4ls1HZyMzBK52J0zhur/dufnw NC898KEOFxPwMFCgvjyHPfsFhpgOZWWovdtvtBy3MBgcf2Mi9qm3+mTzh8rUKyQ5OpObaU W9zI3bhk3oOE1YZ4leLjAeCVUgXHf5J6fQJwHNzzfIO1+18um3fXnFv7VRdIMWV972ttYZ c8RB0atR9oWYi8f8ZOU9FxMXJomiNeHp/iAEjojkVtR8Q7dlsp+sg3RCQEYLQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711646474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GvBbKLHH1lNnYwSHvc9YB99DslQyCsxBcyZm9f0CddU=; b=ifUe6PhoCEhLQ91xiCjXrD2qpNoOBXrEANMVmHDz1nQUihj+cOTWh4YMORxqIJoDl/i4NS lT1fImXdMML6iaGVBwWtYH3+wg6l8BNA1tx5VrspHtfW++s2ciLArF/L8AYjTmRw5cXE/h deDq3zNYq9z9FfxpIpdZLRmvU6hpwyxfpFQBhdAHYWcWIodgurJP0id7IxXOBj6/2zpNic s4GIUqfoOoCRD/GZIVCi/PyRUvPhbLRd7alGL7ZPpToZ85SGjvTq8haOvhCmzAHJEghM1T /Pbl/veSyCL/3E27BdEA/odZcsVeURUvXN4yDn1dDOf0FaY0J9EtZRzlsthM4Q== Received: from [10.255.0.190] (unknown [208.118.171.245]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4V59LL2Ty3z1HTq; Thu, 28 Mar 2024 17:21:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <364a5861-a4a2-47ba-9253-5c564c41ebe3@FreeBSD.org> Date: Thu, 28 Mar 2024 13:21:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] [gdb/tetsuite] Add missing include in gdb.base/ctf-ptype.c Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org References: <20240327143038.20021-1-tdevries@suse.de> From: John Baldwin In-Reply-To: <20240327143038.20021-1-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On 3/27/24 10:30 AM, Tom de Vries wrote: > On fedora rawhide, when running test-case gdb.base/ctf-ptype.exp, I get: > ... > gdb compile failed, ctf-ptype.c: In function 'main': > ctf-ptype.c:242:29: error: implicit declaration of function 'malloc' \ > [-Wimplicit-function-declaration] > 242 | v_char_pointer = (char *) malloc (1); > | ^~~~~~ > ctf-ptype.c:1:1: note: include '' or provide a declaration of 'malloc' > +++ |+#include > 1 | /* This test program is part of GDB, the GNU debugger. > ... > > Fix this by adding the missing include. > > Tested on aarch64-linux. Patches 2 and 3 look obvious to me (so Approved-By on this is fine by me) > --- > gdb/testsuite/gdb.base/ctf-ptype.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/ctf-ptype.c b/gdb/testsuite/gdb.base/ctf-ptype.c > index 4d2df33c53c..ca347893349 100644 > --- a/gdb/testsuite/gdb.base/ctf-ptype.c > +++ b/gdb/testsuite/gdb.base/ctf-ptype.c > @@ -24,6 +24,8 @@ > * First the basic C types. > */ > > +#include > + > #if !defined (__STDC__) && !defined (_AIX) > #define signed /**/ > #endif > @@ -234,9 +236,6 @@ func_type v_func_type; > > int main () > { > - /* Ensure that malloc is a pointer type; avoid use of "void" and any include files. */ > -/* extern char *malloc();*/ > - This certainly seems curious. Nothing in the commit log for when this was added gives any clue to why this comment is here, nor why the prototype is commented out. Other comments later in this function mention limitations of the linker on AIX, which makes me wonder how it was tested originally. Did you confirm that the test program compiled contained CTF but not DWARF when the test passed? -- John Baldwin