From patchwork Fri Aug 30 17:11:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1979161 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Bhj20JqU; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Bhj20JqU; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WwPps6TQgz1yfn for ; Sat, 31 Aug 2024 03:12:37 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 01BB8384F00E for ; Fri, 30 Aug 2024 17:12:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::60c]) by sourceware.org (Postfix) with ESMTPS id D46303858435 for ; Fri, 30 Aug 2024 17:12:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D46303858435 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D46303858435 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::60c ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1725037932; cv=pass; b=IYTilPYpCMGd9fyanUztBJYfW43f/JXayMbfACgq5tnuI3wZKFswuWu+GNM1CwaKDHLOjxk3/ytmYjFHu8/MGYn672A8YNmJVmB6iXZhbhOT5qh8nV/Ou8wfESJ5T/Qa35USfGwobhgX0FsTVc16sSzJmaYpTv6ltPtyva1ItJQ= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1725037932; c=relaxed/simple; bh=FSlXjO4qr4zIF7dxmFh4c1sfRp1XczdiCeOwDh7BNMw=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=gZvuvpMg3zGjvV/zhH/RELHfpGWcV5u7pbn1m1391JJ+4IOoRkn7paai8foAAovnwgOjyOlmhywbATNoZqxKLRorBD91+k7xIqwE8b+RlilHdO5cWmkUNZqCqvPgXkfZMyvwX0ps4BMIe9VYmhiC76GHxjM7UpLdqR+E13bwPbk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=taqqOiLC9rzJjIlbvh2lzv1+fmNUMsedsEsRlMIkzeGRyOoD1VP/w45jnhs2oIMo4bdX2TqcRigJnHr/Z1u9ytCzPxqUPlvYNw0eT9HGi6Vz9UTiivWliAgyzNcnunb/l0zZ5Fof4aOUoHmHCOEgQxb1SYbMDGT+n3vQazHaViIWfSolVKek4Bbo+sZyHmfH0vpQVtmQmYnl6G4hchu9DDNPQNj+QbU2fE4w2V9DlC0jA9v2Vo6s70ZnNGxj7u9kgnsxeLK1hPL6CLGusfB0PHWpM8NQInLAgxo6ZwvArQiOZpjIqVJm2KsPVBtVjo42qE7zn8exO3/H4d5NQH8ScA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1GmM0wRBBRw+kNzy36UmI1Zq6PitVW6oWHrrvpIxoVY=; b=FdYlI3razR954hHeKZAIXsstiiiWbNQdOFyQc450Hp/7U+Ev+whjZedmC8OPN4nypivg1ptSJ11je3ZIw98fMxw7HMelw9/OfYmEooFCla0IuH5uo5mGPmWaDLz9UD24rNsGgjO10iennuCz+uWdrWfT+CfwkF8HYASEZXIvv3mDKRHwvSsdVpLHlDanvfMX+/wdJs7zPEPWlCVM0Z7ygz62bnfMTBJ2BMwqh+ezPQZPdp8kiMNOirtdoI/50FjbLg6R6Jxl/BInwmgU7evJDlbEQAXUSJTZIaoe2jp2CZLFW2Dmbl68mVv0k/g7xZo6BB0Ak2OIpJ7wuezi3mTODg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1GmM0wRBBRw+kNzy36UmI1Zq6PitVW6oWHrrvpIxoVY=; b=Bhj20JqU8+gBAFUAmOKenc2zvRgm4gOtPqaGLLjOFupr57U3PcUtT/zzRZ+1nu8YjVuW9h/hndZLhAAjIX0k/fzzi/nAs/c5ap1qIVXgLy/wpAwHwayZhZW+q6kfnWA0uq8arcfaWwQ0zsbd4EimO3cUtUe/ZgJm05/i5/h7ffI= Received: from DB9PR02CA0017.eurprd02.prod.outlook.com (2603:10a6:10:1d9::22) by DB5PR08MB9997.eurprd08.prod.outlook.com (2603:10a6:10:4a2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.21; Fri, 30 Aug 2024 17:12:03 +0000 Received: from DU2PEPF00028D12.eurprd03.prod.outlook.com (2603:10a6:10:1d9:cafe::a9) by DB9PR02CA0017.outlook.office365.com (2603:10a6:10:1d9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20 via Frontend Transport; Fri, 30 Aug 2024 17:12:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028D12.mail.protection.outlook.com (10.167.242.26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Fri, 30 Aug 2024 17:12:03 +0000 Received: ("Tessian outbound 8e666bd17457:v403"); Fri, 30 Aug 2024 17:12:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 01ba065904080a34 X-CR-MTA-TID: 64aa7808 Received: from Lacaae7c62304.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AAA5675D-8331-45A2-9DC8-DF188D8019C1.1; Fri, 30 Aug 2024 17:11:55 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lacaae7c62304.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 30 Aug 2024 17:11:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H4tvB9+KNa6yslX0pRMJJsnlysc/ihe0bTusw6623oZ2qWat0Q420aeMWqacG2MEhg4fNUy57EkLUANpu6v7gy9GJX09Oi0F81cKq8sn4X+nnvYA2RZc1I3P9FgPbzIBhF8sTAcMrh8SkWiOCN5U5d4qEpZSPlTWjrYQOH9BQ9wpS74drfQTbQguXLJuFjvjRe8fL0D0LOTSUrjiEY/HQNCEHfcgs7Ok5+dczJ/dvO/l8gNGlQexiTzoZBbYJss+GxAfXiTnRJ76TO4APbIN3Jbi32g16trJYflAibM4G+lVz0xEBk8XFXyhZSZR3Vr82JbBSkcU+lfLAFXS2oSHFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1GmM0wRBBRw+kNzy36UmI1Zq6PitVW6oWHrrvpIxoVY=; b=IgeNGvnKBERJLXWIkGcbYPSxAhphmWQp4KOM8rCwmPxKSBH1iStVpCikMCjOistZ0Ew0HdLw4HlGqY9J+k/dqtqzNKb6kE77YyAY9YuwPLgAa1IYqmwkuPFeoYkSVURU/qqhxQA34i0sLxCfQFGhDifWTXTSebkFafVDxX3XP6c74oOsv3AQ17+2IjIFCvpQviai7Wl4EWKZXxczVHToj+lAFqGvaRxz/Dycth6tGn5mQnWgaVD/J3UnbG/hwFp8OoX+ax6Ns31ULG6ZFCceiwIVM+pGy9nsEXTPTzz/zixRxON9E5cW3t1qF2HErjccMg5QDbSH9SvzLzFNUvoXCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1GmM0wRBBRw+kNzy36UmI1Zq6PitVW6oWHrrvpIxoVY=; b=Bhj20JqU8+gBAFUAmOKenc2zvRgm4gOtPqaGLLjOFupr57U3PcUtT/zzRZ+1nu8YjVuW9h/hndZLhAAjIX0k/fzzi/nAs/c5ap1qIVXgLy/wpAwHwayZhZW+q6kfnWA0uq8arcfaWwQ0zsbd4EimO3cUtUe/ZgJm05/i5/h7ffI= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by DB9PR08MB8201.eurprd08.prod.outlook.com (2603:10a6:10:39c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.12; Fri, 30 Aug 2024 17:11:53 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9f32:dc2a:5bec:aeac%4]) with mapi id 15.20.7918.018; Fri, 30 Aug 2024 17:11:53 +0000 Date: Fri, 30 Aug 2024 18:11:51 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH] gdbhooks: Handle references to vec* in VecPrinter Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0310.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:391::18) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|DB9PR08MB8201:EE_|DU2PEPF00028D12:EE_|DB5PR08MB9997:EE_ X-MS-Office365-Filtering-Correlation-Id: b4ffb5bf-80fb-4165-2da7-08dcc916de0c x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info-Original: 92GM1m7YcKvkIYF6bxNOuDY4rzlB4ujYubT/x2CYc4w54SJx/2eyyr9YpvMJ3v7X/aYLBCKsl0dkpn7ZBz2s8P/y/OCeBWyW8Ji+mLoBqzfbfBnZSBnDfVbKDf+bDGaJmBbQOT1YBgof0qs+6tcE+RxgBgit1KaDa9yEhcFoQEasjkisVrGG056mXmbFBMBalR61OjVP+NYQTUzCNBd+7TuExnuPt8+oJA5qk+FtCBPEYZmyGC1GaAo7rvJ5tLARNgH8AogYex1/mq/Tzkl+D/jl+SEwHjADpp6Sgar5/CFiJXmjQBZIKn75+U4R5jl3DYUAfeZo/QrX/4N0jPhaD2seZegex9/RlYkZG5t+5N+Eircouwk2E4Rdm/m2VUzeI7YG+F6Q8AoQS0sDtGYq673RLLODJy8GuPg8bbuQEPxVQ9NTKfR/EQf+w5s72AWqU6Zx5SEY7mifdwEWEO8jbUHo356iv2j4O2A8NllqS/4cYFBUFrXCN3Hm8RAAow6u8E+7+K+BeeXzYwsfx5HVk7BOQTbO9Wm5vzvXUyKF0G/SPJVTO5BmH+hVr2NNjNiaNgeKVB8jjENom6Bc3531wMU10oYfpDa4ck9Xg8/+ZMBH3/l70uSZiarfMuhftSsbIXhpY3y9k4k9yquZ2tnCcAWugB8i2itdJAkJMfAZjf9amhI5vC9EDn5tX56t5vphGF1gilI4cUMjFuFoFa7EXKfAG1A+pcdPKMv9PUz54SvYtB+0TjcHThcasYawcRemOGemfPw+q8TfZGHUZtEi1w06SI3WxdK5sXCSauJnNsWu4ze7QUs0I+SBXeVf37fBHcwMRXyTfjqneizYqFoGf7cfJD4kOgHVRE+JcQkKRV+ZquQaBkK/jjuF60jfLUWD3pCqUteavaQCbnIrXjkUPKKsE3I7EIUEIqelo+k+cF+kOE+BHOZ70XU3H0qXmIlNcRwDfOshROEcf1q5VHid05mqG2LECPvD64izZgBytEyGSIOqMgnmmALizxTIZn1DPrg6GY12BYVeUg7Amj+3dJkiReZqURUJxUBo+9YEmjw2lJU92eHXQUxq+1raI6cO9FC2Pi2Ys6QLsZIJaQxCs1SRdJkCqoGChP0MD1PrBjQFG6YxrvsNV/J3DL6cu75eQdpujW8iOzH5UP3lRIZJ9oInU3iQzdHmNTIpu4LF4hcqpz3XB/0Qch1mIV2gbYsgstWbVr2XHlIAjjaSz7lm/UapO3aoAeXtqfE/WVct/Kngq+17j4S3n0Nr1L79UKyfBL3O98bZZutdn/cPfESWmsrGctmPy9QjRPiBVUA6E1T9OWG1La+2BM8YAzwLkv2ouI4GhAbQv/d5muJXGTCDpg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8201 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:33e::15]; domain=PAWPR08MB8958.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D12.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 82080f0d-b4df-488a-3094-08dcc916d813 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|35042699022|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?wkDu2SYsEQwtWEgeuGEuSygu0BQzk7x?= =?utf-8?q?GyBF+aSGiGLAMWzk5vfNM8CNyAdTsoFZz+GiWz+3ZZTJ268bC5wSXQFLcIcQidXxW?= =?utf-8?q?fGAqYi0t21I3PGJteI/S/00FAbSpUyHQI2UOehmXv3SZFunxNrRm/QFysH7lpiz6K?= =?utf-8?q?0MZWP4kSpQo/ot1UXMrEy8KWkdA3V+mFFxOk6IObTDK6kggDS8sZ2dnFxOBQ58CDS?= =?utf-8?q?7maxcg2BtVw+2chQyerk0miUQLzByZJKPopGIjFcBaYPRqDghhz6CBpgTheoSzFh7?= =?utf-8?q?NJELodK7mwkPYLxX0cKbSXiZbMhaJHYB2myTwh4vDP7L4cc50bOnBwNJMjthuj5sv?= =?utf-8?q?yhhnYddTh36gRwGPgV/qS2nbwZb0HTWMkYKpRWlDD8xkhpnPpRDvHGGrjpWS5E+CC?= =?utf-8?q?OleR4NOflG5dITkEMhFF2vJXLnzMtNJJ7kWJUo05Twt2EGrxu0JTP8vYjUCRNhmIw?= =?utf-8?q?rRcUpBHuHVXN8HgOH6SY6Pqb+QCUqyYcAigCHQXvUQ2Szo363tmLOOJnA2hpSpOky?= =?utf-8?q?4ufc6EMMagiB0XNxwBnRQ8L3N51SPBShBFYE53cOAPJrG4t6EKBgCCrqt53pvqZ3T?= =?utf-8?q?zvBBCrRxDThN0sNEQvsODxwAFb7766yj4o3OwzwfZHeS8Soq6DPf03zC6wXZ5CdYx?= =?utf-8?q?GXLLy3DlzqOuaZyvonTwtn1l58TqPijtBwyE9LwVwqXZ0o2aRmyl5GtApy8uxisFV?= =?utf-8?q?bQ+8nJN1fDq6ZSjmDGq+1lx8zZ+GqYt8Pmhv4C7WoibxhG2loN30qkiYXGmr+rPyz?= =?utf-8?q?dlSV3ajNtdFgAL0QFALuRbQ1Gv3PsDCm1JXlM5V9A3zji8zVMipepOnAyxOmtMrFJ?= =?utf-8?q?oi8Twl7M8+C2zR3/BM2kk3LRWDjKqo4txD9UtO+Fo9r6is6wAOSiug2sr/6wuXuOA?= =?utf-8?q?Lg7PU3PCPtTMW51lm7yGlmQmyc8o3Mn6h5ALiXaplNzmENwUS9aJGWkrD4aFwjPcq?= =?utf-8?q?gu4mLuFlwPzOn4uvnqyztAHu0854fEfgDeUg9ry3VlHF89j9+cEyAeD0u1JCT2yod?= =?utf-8?q?9iI1IZF6VyiuItuf00AyRWFlARyva0qmKOO1dk/flIoAZxHMdP5bAAMCfGCKxWg8q?= =?utf-8?q?NeylupqA6w7VInpZ2nT6vIcJDE4NmWhV0Qj8cM0Tmy8XkXYfHtphehBwBAknpiQIK?= =?utf-8?q?P6LlMvIlpVZz/kQEOOVy025Rn+8HCuByQzylrspmNifSVGeKDdYxqm/yrXNoG5DrI?= =?utf-8?q?6lMzbDIPjJbB4krXa967B6GTpw17U5PQ2cgqMeu7CgER1CBOWiw765on829lEguf2?= =?utf-8?q?t5wwdjHxUNqmvHHMcVDUQAf7AeEtbvLltLE+kU3kOACFNI2nfprMQBbtjpYnyI9wU?= =?utf-8?q?Gb1UePdP1LoB8eRrEWogBvJ4iepn7Z3h7ha7R3XMYZ3jyTm4i/8jWueKRLw1rMGki?= =?utf-8?q?I+48+2vwuDQ?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(1800799024)(35042699022)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 17:12:03.1258 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b4ffb5bf-80fb-4165-2da7-08dcc916de0c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D12.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB9997 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi, vec.h has this method: template inline T * vec_safe_push (vec *&v, const T &obj CXX_MEM_STAT_INFO) where v is a reference to a pointer to vec. This matches the regex for VecPrinter, so gdbhooks.py attempts to print it but chokes on the reference. I see the following: #1 0x0000000002b84b7b in vec_safe_push (v=Traceback (most recent call last): File "$SRC/gcc/gcc/gdbhooks.py", line 486, in to_string return '0x%x' % intptr(self.gdbval) File "$SRC/gcc/gcc/gdbhooks.py", line 168, in intptr return long(gdbval) if sys.version_info.major == 2 else int(gdbval) gdb.error: Cannot convert value to long. This patch makes VecPrinter handle such references by stripping them (dereferencing) at the top of the relevant functions. I thought about trying to make VecPrinter.{to_string,children} robust against non-pointer values (i.e. actual vec structs) as the current calls to intptr will fail on those. However, I then realised that the current regex only matches pointer types: pp.add_printer_for_regex(r'vec<(\S+), (\S+), (\S+)> \*', 'vec', VecPrinter) That is somewhat at odds with the (pre-existing) code in VecPrinter.children which appears to attempt to handle non-pointer types. ISTM either we should drop the handling for non-pointer types (since the regex requires a pointer) or (perhaps more usefully) relax the regex to allow matching a plain vec<...> struct and fix the member functions to handle those properly. Any thoughts on that, Dave? Is the current patch OK as an intermediate step (manually tested by verifying both a vec*& and vec* print OK)? Thanks, Alex gcc/ChangeLog: * gdbhooks.py (strip_ref): New. Use it ... (VecPrinter.to_string): ... here, (VecPrinter.children): ... and here. diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py index 904ee28423a..a91e5fd2a83 100644 --- a/gcc/gdbhooks.py +++ b/gcc/gdbhooks.py @@ -472,6 +472,11 @@ def get_vec_kind(val): else: assert False, f"unexpected vec kind {kind}" +def strip_ref(gdbval): + if gdbval.type.code == gdb.TYPE_CODE_REF: + return gdbval.referenced_value () + return gdbval + class VecPrinter: # -ex "up" -ex "p bb->preds" def __init__(self, gdbval): @@ -483,10 +488,10 @@ class VecPrinter: def to_string (self): # A trivial implementation; prettyprinting the contents is done # by gdb calling the "children" method below. - return '0x%x' % intptr(self.gdbval) + return '0x%x' % intptr(strip_ref(self.gdbval)) def children (self): - val = self.gdbval + val = strip_ref(self.gdbval) if intptr(val) != 0 and get_vec_kind(val) == VEC_KIND_PTR: val = val['m_vec']