From patchwork Wed Apr 17 20:20:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Alcock X-Patchwork-Id: 88603 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3E59384601F for ; Wed, 17 Apr 2024 20:24:24 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 0F4CD3849AE8 for ; Wed, 17 Apr 2024 20:21:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F4CD3849AE8 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0F4CD3849AE8 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713385294; cv=pass; b=JAa1M9O+Xo5q9dntD0SV5sU1TbYEt4ILjhQnCCTN8sHEgORJp+SD1Ma630H1I3/x6kOJ7RZTU33HY3FlL5KUGi8b7na7zzm72VGSypFTHdusqJcux3MBSz3wiBspKsp/6AmrfSe40UiehyFRGQHY3m+jgajLh3jhsevsf7+QOPI= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713385294; c=relaxed/simple; bh=41oCnZavyGgXpLzur7etpSz9T8jPKt7IBTKfLfYg+Qs=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=IMIi8t1zh4lQ93XUKFDwMWzPKPSBlAByBGM69MG/W0CdZhZSHGcnFTqwGB27hN/ZmXajhmTyA0RGoIz9pLz0HQfK9n4zJBBfhWxjEZ//qaGBSSuuNN1bCwpRWG3Pegz+AWVB509WyYnh4byMlmPu4f8UukH+q4d/BYEhNkr7bhY= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43HHhpmR025883 for ; Wed, 17 Apr 2024 20:21:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=JCq4YGIJAC/umNxQ7jmHM8FRMPQS7j2ciGg0DKPpGV0=; b=C9rHPpuSLQXQOeH0l9SFRf4W5/ZAhWC6U7YJQXpDsrAKVxgF12VFsa50d6Bx3ybHCm1j bWdnEorhEvt1WCDCeSP/+b0mQQQXHSIjQoKacGNh9OQ02+QC9rIl3uJsll6ly5B1uk7B 75HijpHKNjnpHrfIeG53qq5EDAMLoN+jn+y8tiz16wMaaNQQtyUYUJ9GU2v0lAwk7Kte ZaMi/MTpCMoT6sQ1m9M9vXwmpgfLifttuwlHrk9wgQEfXKJ5Zc+yujQOq54x7dLNaIBm 1yNq2PotgObnTxmUoMmcmd/p9+6mJl+vphynlr3fpAJ8SuKnXDLcNmza7mzXfG52YXZo FA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xfhnugx4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 17 Apr 2024 20:21:29 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43HItEA4028859 for ; Wed, 17 Apr 2024 20:21:28 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2168.outbound.protection.outlook.com [104.47.73.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3xfgg9cn3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 17 Apr 2024 20:21:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=km7kUBChMrp/1srFW1NdX574c0St2BMNS6TLTfZ/mV3/ezXb95gGmzpogd5qFtL37P/HZFjOEns8v32UM997CV4QpLZl5skO0UUkNzXxvUD3OEHdpo31ETzFT3ZJBCZRMf/c/PJYE3fs+2Pqgmh6PsiuP8WcU5rBJWdpfHijrbYD0pvRVWCW88En04Wd/IgqOyYcJYzP7HlBZb0IKCOw3c32YmuMT7byd45GleTxcAPN2zr0iydN62Ogwln7SeUedudqij2ELUieqNbJ79kO39BwA2Y/ydU5lAy7Yeos7CQmKjrQM72LNIdwOmBVEb2cfL3ir4+IWuI7O5IDUCMJ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JCq4YGIJAC/umNxQ7jmHM8FRMPQS7j2ciGg0DKPpGV0=; b=dwfSUXMkE17+5gYFinhvobyBr5n7oLbJhPR9IYrLx2lIChQH/8Q3KzNNm4L2asrE6qRjD69/FBzCfJuO4Y8jK7TkN5su7DL/Zc8KXLlwWll/s/hGiyy+9aTZu/7dfmckcRsw63NGSh4W3LUIp3zwiWqD9s4SLbZtwQiOCymF1geQkrxkMJ0bq8d8unl6tGaHBySqIRzY9WJlZRNicl9kYwmOZ0p6FfD9Fwxzq9KxzXnBpSJpEvRouYZtemU4NJxvVx60YRYag2SANMWk1MyaC3DkQ1xH30VNknBofHg+ed2YZs8gN9IY0KHW9ily4lWGoSBEGd1WLn9gsvsrfK9xcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JCq4YGIJAC/umNxQ7jmHM8FRMPQS7j2ciGg0DKPpGV0=; b=SHSd4w7jQrKXK0KyBpUCQ6FDaN2NPpJI85MR1BmyHB4wYrk3GkaPL+bF3l9NbeodIYcVtDS5zfVO1Xtygo2FITFzyYeqV3OYVClnk3oe4+HU67EzMP0Af1SlH109ccRHFjK9muLhLkPipncKk04DsZB6LQm1s/iocuEL9L4hJ3s= Received: from MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) by LV8PR10MB7966.namprd10.prod.outlook.com (2603:10b6:408:202::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 17 Apr 2024 20:21:23 +0000 Received: from MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::67a4:9544:7249:7751]) by MW4PR10MB6608.namprd10.prod.outlook.com ([fe80::67a4:9544:7249:7751%7]) with mapi id 15.20.7472.037; Wed, 17 Apr 2024 20:21:23 +0000 From: Nick Alcock To: binutils@sourceware.org Subject: [PATCH 14/22] libctf: fix tiny dumping error Date: Wed, 17 Apr 2024 21:20:10 +0100 Message-ID: <20240417202018.34966-15-nick.alcock@oracle.com> X-Mailer: git-send-email 2.44.0.273.ge0bd14271f In-Reply-To: <20240417202018.34966-1-nick.alcock@oracle.com> References: <20240417202018.34966-1-nick.alcock@oracle.com> X-ClientProxiedBy: LO2P265CA0224.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::20) To MW4PR10MB6608.namprd10.prod.outlook.com (2603:10b6:303:22e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6608:EE_|LV8PR10MB7966:EE_ X-MS-Office365-Filtering-Correlation-Id: b94ba3ea-acea-4afe-db9e-08dc5f1bf35e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Tb/3N+O8qgKQ6JZ88hr2JrWjqJHnvDoALGK9VM9D1e8MrYuX1o4jv2N3x40LATf32oGShCmBlaYQdFjVcnAE1lJEnMlGw1H38jm63RKRuU7WbchsOpLw7Rnl0PxerO7Ksw6NRczlWK0ndqoYXN0BcAtWcfaW2CU74s2q6KUgigFR2coC3q4NI0FJjlysGE5/LLKi3+BmK+d/wpfaCa4aQzEva09kPyOWqUhAKiYauWBj4MxfFoPxBxoQFh97xnAED5MfkGdnqLfOt6G467+rd2JU1gi8cThcKTfHkkrSLsuxbDYmIzv4Vt/qaFDqD+yZl+lv+uCVR5CeUZbjTwAF58nwJp3oQb/1TKvac0a0593lT7xFEF0ybx/bRD3wCfhkZOkR23UyFTOx//+wI17oMpvi4xC3qnmdrFcA5f4+2xzSF8y2dVfHCmXVrG0LMZfxfMjoc616+tGv3V+J5qBlDUBu/83iJ9UaVIC14RJQ5hmSwyFdyGAOldgrt/FEP5+HYB9RReXlvLrSbl88gRjtJQiStj5gdMn6676BfU9gm+OPxswSwwp8s3Ng+RgJfmzr6Rp1v19nsUhaUa1nI8W4RgOKMSOphCUvEyg636/8/r9pQGnKmyYZq3m0woDD5UNQOFMRioTclosIC2Z4jYbtV3vLv9kZXuJBrxSmOAF8mI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR10MB6608.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4QCI/706173sT4Spip7jhnFK1Tv5xva/d7vZCQmY7okW6XQnjdYiKvQ55U49FT/BlOmdK/xR/y0RZIqpHdZ4kXFMf+4d1+zVkijsbMHSpwik3bCBZgtRAXE1egE/NgGnbL0xAg9BVHTawhe+VdMvGxNlEPkaby9zxhubAJNTqfKRwiRjMBG6fc4Hmi91dKevxG1ZiT2gbpODBh8lEmyRgMbfsU/usNTlgkXVpytrnY6DzoVu+NgkjAqbqNiAtUrV7fvBUV2fJ6dxkh1UoYlsIV6G/fpG9knGSuT6xhx5sYRh77fsd9wl0veTBT907rhYfdoHSvMB9gKnJoAR2u3548mv/QQHJ5Q1B/YP5N6dqQnb9eWbEmpprX+rKocGwVdF0qitX/A2lc17fXCWQuAQ4qePYT9JjH66p6lfPYnjrNSjpM2r8tk9kivyhUpiPrrXuOQs4TGSyoufbM1wbx7S0HiERNpYcLEWFZKoxMYceLuh5bveYlSONJj2VHOa/vv/HvO8DrnuxddtxPoK3GllElsmPIfgpTN5wYQ4RcFzkoMKdVzxmZqPXxptXmKQ/5X1Ka9k9GfslYdmZraZN3ZU/GeSLiQRcucp8nf7aiDpeswcRJj18WsAeuxu4adQCUJor0eoSPUWEvwS6azNbiNUf6XNjo9Ew+zScsawcplV1dcVChazIZYmChwR9qFCLy7bEGNULNShu1Tf+nvwRzhzG7BYd35EJh0mYMqzUnJ80cYY5WaXAB6dACuQ+ouh1XcnYJbglzoNGbBSZh1jCrp1EO8tLinklVB70lGy2LfFnBmCys8Ghzu8wXSqCFUs1rVRVqkkAWbkagSOomAEZeETsqsgjXUil+qIKnrcXT8VoeOu23NoItBoX6f1Fvk6Hz01aInpYbmpi9shMi0ELQ1wIddU3K1udYGRe+06yVtK5qSAlQpnNgJ+1W2hwm7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1Ms46VEqWcBqmq7RWaIc05w0xIpCTJ2AYUxzplxD1cNazIKM5pBJ2GEWKoFtX4y7TjsrzSIH3qCFsVMVn+v2xLZEfMcckMTkvpPahZCmks6rkGfUup+yWrIjAvRiUBUSS2vcyTKJSj0JsqNFe97NjORqW+7FXhO3LKT2tEoeF3rDHhzwgu6m6R2NBYYiRUi2tEqRhQU8H+k1ps0kqVxS222AorwZAOfc3CvBifXmso1lHnZIOlrfBj98YzQnjjwPGsqZ5PS9Atjq1muRVrYXr5JdT8fGMRcI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b94ba3ea-acea-4afe-db9e-08dc5f1bf35e X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6608.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2024 20:21:23.2494 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZZUvWakd3MIwd2eZuLmZZJXLcXesV4HTwHOclFCu+NGR76mXgJL8CgQczdqWVPrF4PtyH0vwrGIm8aIdKwEJzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR10MB7966 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-17_17,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxlogscore=893 mlxscore=0 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404170143 X-Proofpoint-GUID: 8SZN3tg2jDiS5VSPhY0y75MGFdv8gMiC X-Proofpoint-ORIG-GUID: 8SZN3tg2jDiS5VSPhY0y75MGFdv8gMiC X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Without this, you might get things like this in the output: Flags: 0xa (CTF_F_NEWFUNCINFO, , CTF_F_DYNSTR) Note the spurious comma. libctf/ * ctf-dump.c (ctf_dump_header): Fix comma emission. --- libctf/ctf-dump.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 474c4e00cea..2213d09dc29 100644 --- a/libctf/ctf-dump.c +++ b/libctf/ctf-dump.c @@ -333,13 +333,12 @@ ctf_dump_header (ctf_dict_t *fp, ctf_dump_state_t *state) ? ", " : "", fp->ctf_openflags & CTF_F_NEWFUNCINFO ? "CTF_F_NEWFUNCINFO" : "", - (fp->ctf_openflags & (CTF_F_COMPRESS | CTF_F_NEWFUNCINFO)) + (fp->ctf_openflags & (CTF_F_NEWFUNCINFO)) && (fp->ctf_openflags & ~(CTF_F_COMPRESS | CTF_F_NEWFUNCINFO)) ? ", " : "", fp->ctf_openflags & CTF_F_IDXSORTED ? "CTF_F_IDXSORTED" : "", - fp->ctf_openflags & (CTF_F_COMPRESS | CTF_F_NEWFUNCINFO - | CTF_F_IDXSORTED) + fp->ctf_openflags & (CTF_F_IDXSORTED) && (fp->ctf_openflags & ~(CTF_F_COMPRESS | CTF_F_NEWFUNCINFO | CTF_F_IDXSORTED)) ? ", " : "",