From patchwork Fri Aug 30 11:08:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Coplan X-Patchwork-Id: 1978910 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=GwHHRuD0; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=GwHHRuD0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4WwFmw1vZmz1yfn for ; Fri, 30 Aug 2024 21:10:24 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 028F7385DDD1 for ; Fri, 30 Aug 2024 11:10:22 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on20628.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::628]) by sourceware.org (Postfix) with ESMTPS id 877523858C50 for ; Fri, 30 Aug 2024 11:09:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 877523858C50 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 877523858C50 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260d::628 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1725016194; cv=pass; b=mpUm4K+YLZAxxBxmioyTT5RND1fashRmoTod9ODzMjoS0btWNBJKjrmEZPUbdOlNFMM+jp+/L8jQusZSUENEf3JMR8g3XxsdMlQV/n12XF+bJWsYNy57iw4yD+H02IbVwqrwJ6midMoElUDVgC6BqquZtNIPptmbTsH5iOxRmQc= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1725016194; c=relaxed/simple; bh=hBiDgGwzsfO2u/uJpYzswjx5WDBToKJ1g2W3vULbKaM=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=DsRqJO57a1xghW3RgBM6O/srsIeSAPZJVlbLOkQjFuPjttRg5RIo1M3aQw8PaIBXWaVYSjN2Ir3L1yc2XHK5QQtUaJPm8gbhORixGbEQ31SFXG52udck4g9j7uI8ZHgZ759nnRj0pXXZWW2rRsKjaokemslcsgedVKamR0w+rCo= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=HMAH5XelhlvsODGB9PKnNQGpGLMxSfU6ffhSr6MNho8Da5qUsJBAx1LgTlUR6PWjLaJnnHLS7cE3KX4AXXy7T6aY4biT7KUgCwSFi4VAt/8yW2FQAUYgaD8ttfTcYch0+QJ25y9PVRe3LdyMb5BHHOYRaeoBBYRZkPcrC2B9x2Uc+M1OT/hcBn/0U56AKu0GxipwcDj/BrS/qSaSN7jvCmok11go+K41Rtg3+yQnKKpzHUoOfo4WiY8H3GAlRK7BiEku0fnUHfc4Qv5yPcMhR0nseZIEV4KhBqEfC845kAVTTos90y8vRMjOrhiiIyh7zuwoXF2xMRCshMPRKSqVAQ== 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=sTBZkNNBhI+SsqhfuTbQlH4kZvvDsMG+7dp7QYEHdfA=; b=ItsaYBV2QFo2h45V5l4A0zbPufiSNwuhw/hOsIAALS1iHvbg+mpA30/1cdl0FTK0LRuWolk6Kcw5Cs3t58TObeNkpHqDDXtvpM62hrRTCkQ/pbDzlIFAqNohNi2X//4wL7yxixMYULPHvDmBOOlRYD3sB0y0oKldnXbenWCEFYT6Wuo2mPMD3SypMgwmO6Qd6KVNNlF8XvfzudvosRrAkh0/SXOsFmhdzsw7jIAK5tyICJIEwX2bEpnI97n3SU5S2KKivEvR6akzMAGLQKvw/G7tAOGVyCo2mRXe7liiX+UCcAWFFNPerGvPVFsEY7TBsf17XZR0rCXjcFy/KJCpvA== 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=sTBZkNNBhI+SsqhfuTbQlH4kZvvDsMG+7dp7QYEHdfA=; b=GwHHRuD0iV0BLTfjb0VaxeGiIA95w5N9vkopZOC16b8F37E+oUPtU8VNs7PEIomNEmEI8v/Yoe0RAqGRDp90ofAfwYWpvS1hwxL1SFDS/i92YQY6zIx4vaLMgdYCj6Bvhb+0ZOT0gdrJgyqOgKBaHJQnuqlJWv6OwbzqvJeuqlo= Received: from DU6P191CA0039.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53f::13) by DU0PR08MB9393.eurprd08.prod.outlook.com (2603:10a6:10:420::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Fri, 30 Aug 2024 11:09:42 +0000 Received: from DU2PEPF00028D0B.eurprd03.prod.outlook.com (2603:10a6:10:53f:cafe::36) by DU6P191CA0039.outlook.office365.com (2603:10a6:10:53f::13) 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 11:09:40 +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 DU2PEPF00028D0B.mail.protection.outlook.com (10.167.242.171) 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 11:09:40 +0000 Received: ("Tessian outbound bc251c670828:v403"); Fri, 30 Aug 2024 11:09:40 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 26f1a87bcf172e37 X-CR-MTA-TID: 64aa7808 Received: from L2d1727d42285.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 47435128-B48A-4D24-8C7D-B2CC0ECF5050.1; Fri, 30 Aug 2024 11:08:44 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L2d1727d42285.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 30 Aug 2024 11:08:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IgeqArzbnMk4z5kRNLDU06BC0Uc0Uj9ThZL8QhWYECWs6t+omTU4OQ9KR/UnCzCiXs48VYVcro2+suHHNXBMZYuZwS3dOdPybvKfYWLSO0IqcVvFwXkWxCVuw9lI+yCllPPdO0Vth4dOkehtqepT+n7pJg5Gw5JqUqmLuA4FTZDQRqyHG9Jz3h/22AXFazO9OiNA6XQkmrfCByMoSTQaLw2QPuTuDqeC6QmvYSwuyyJMIYNQ9Lir+mW59coeOyVbwN4L/uXHvGFISbbci8D8Wc3kOhQD1/1RICcb+GoIB0UepZcD196i/tqTm+iAtXXPPwE2XY8U4+OMSDugHQcSmg== 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=sTBZkNNBhI+SsqhfuTbQlH4kZvvDsMG+7dp7QYEHdfA=; b=DZZwTyNa619+uAacPLepJvd/HVfykI3ymPIWNzt953phZCNhX171EQBYriQMe+Gdc7KoI1+t1AulUd4jbAg5m1IUi+rBSg10PECDIgiA+MAad/AebeDPjEXdGN4zFjjwlW2WnP/E/79CMJ0a7QVuvH5M6cwRzmFLufoeOKSl62JbaMLYIzA8AbKxUce5x/iSNVaQ9Nl8au/iKTfA8aE/6r5RH4YhGuAu8N7c9QWWqe34UT6VaMnnvXtpXloOYb6p6tuBh8ovAhqCJK3RWufmph8Y6QRxb8m0Jr9Uv7JZvmQhLIREtkPtQ1FTKaZkp5YzlP8371T2Ndho7wFyfdw1Sg== 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=sTBZkNNBhI+SsqhfuTbQlH4kZvvDsMG+7dp7QYEHdfA=; b=GwHHRuD0iV0BLTfjb0VaxeGiIA95w5N9vkopZOC16b8F37E+oUPtU8VNs7PEIomNEmEI8v/Yoe0RAqGRDp90ofAfwYWpvS1hwxL1SFDS/i92YQY6zIx4vaLMgdYCj6Bvhb+0ZOT0gdrJgyqOgKBaHJQnuqlJWv6OwbzqvJeuqlo= 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 GV1PR08MB7876.eurprd08.prod.outlook.com (2603:10a6:150:5f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Fri, 30 Aug 2024 11:08:39 +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 11:08:38 +0000 Date: Fri, 30 Aug 2024 12:08:36 +0100 From: Alex Coplan To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH] gdbhooks: Fix printing of vec with vl_ptr layout Message-ID: Content-Disposition: inline X-ClientProxiedBy: LO4P123CA0419.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18b::10) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|GV1PR08MB7876:EE_|DU2PEPF00028D0B:EE_|DU0PR08MB9393:EE_ X-MS-Office365-Filtering-Correlation-Id: 860b4816-fcfc-46a7-8060-08dcc8e43e7c x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info-Original: yyVlhyF88IzHl4utUvRh/yyIDaFsmvjH3ZrOMcimNI8HGAT2yk3lka59PG3yCp7zDSBNOGe1Y2TlWhYNqzdQwZjQ3VpduP+QWZ/U0TBCfmlXIoUqFToi4BTPDLkmaX9RcbFMMWfAAGNY2xlf+00rThVhUkXIR/4ryayzo79IIEhlnnAvOdEAxRHb4plD+Nj1h0oc6SDfglFhesOVcpfU9LbS1j1CavLtOMhtWJo80l/OnnjkvYAM5qGn2k32zUcbs4yAg0+Kk2ljy384b25p8B4nHXam87EXdlZMKztCXEl//2qt1+JQSCwSSZsdwIhC1HMgb4b1eaNKkjUA4ObAJsN4boNTHOIsEDhuA79zLrzsCt3r9TxYjGEUB3me1R4hw/D/6uDnjAjEvRXJkPaISDw8ADT2bElFiU7AOb0BvReAVzrURGIK2QO0C922fHSabLjN5zciQ3+OVhR3FM8glq2B07zaN1RX3zu5R2s7spHX4sSJSchOTCwgax9I1ipKqtOxLYJaqKsUHlt9qPbyHJ1aOf42EmtGFtex3HQZL6RkmsMgO/R9XKx3Z6Kz/3N0AKwLXWnHpo0lzuHdjfXRfVJHUIesrWCQN4AKG5l+mXHsIJOt2PfXOKoGjUBxLlb/bxIWSEcDWlSLl+xoZRZqFGcrkivsetaDb1/EaGIOkBGFhkTtf6elekWXrh/q6TzR0NllisNr+KQHk4QN6KP0T8rQsLdXW3+vsyHW292iakQmjaU9RhExSPbm69odbxzX3q0Scm/Y6AnBepce0ZkJr3y/C/pHhzEHEqkP6tkucWfLLaW6yj9D2jFiEEIyhWhlzrKI1tPa1Gh3RkJUYql8aWD6JtYQB+msv+AcCS8bvcIMi5vIADLLKCdG2V5Y33HViU9ORreNIk1qAjhBCtalFytMbgxZKv9W0oBVXUdRZML0UWbhoC50wqsFMLNK04GDji02O/gdJL6JQlXkX3XzyfW0FGmhCl8l76jNwlrYiDOR9UFDoglFOa4iLw6C/QAHISlVxuWaG4zLWCUNUwkDIWnK8HXxFU/INRtX3Idp1ePAgomwERH8YoGSN7T0bsP+Ic9XbShBbUif/M84JlaF+99AT9zTyJD0yAKlI9w/95HHXI512W1SjjrK8f+CLk/MWCyfnObVDugxY55S3oyeOC/5jfJhawl86yGrtziLA71fPmtGjngcXS21yenzNCcHVR+fJLQ1gsw1d/o7mUiK+BkTFoDDu+Fy5zCM5JocYZvqY0unn8O0Me3uBXFO2ud0usCkD/Ji7EWixgorqpMwGeAiV+5fQoohRHpMh/NMWz/6OMd9hR8gzyZ5EMlSRrvUcFpmlOxmWZLeYW1+2bmr2g== 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)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7876 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: DU2PEPF00028D0B.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5ac91be4-3574-433e-224e-08dcc8e41988 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|35042699022|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?zoCyFo5cD3N2g/wROM3/wVp/5uSwUnI?= =?utf-8?q?FY6TJXFgecYTFjpUFpWFhpvZiiaKrecp7yXYpx3e5svd9uPufFdjSr/S8mYtzp4aj?= =?utf-8?q?VeAHH31uV8Ylwtr7ZALUbiRqbQHs+bT3Y/bGWh2jt+o0y2EYhuBfnhhCnmVDjlbHs?= =?utf-8?q?a+Bs+GwYnROreqK1EMJRmwvucOqEudiUCw4BwKNRKpEOVnNoI00F5v1rbONxmXV4c?= =?utf-8?q?vHaFBQdTYLTiECU6aFOFUinJUsTwRL1F4iuOH6DFSBsfiogwyI0PFGdDaQA6DMav0?= =?utf-8?q?MU+u8nKlA67fFA6wboF1o23h9WqPf3IzU6bEgOORK8U28Onz7oxsI9Ld9ef9XxGO5?= =?utf-8?q?3iaEiNmFOcDTHUYpFikNztAme8QA3sUTmem3RYfCkgbRbHK9bO/Ag9GN/86ZKQBCG?= =?utf-8?q?WH8JtNHY51HBhTZrh53d3S3sdcjSbYhf1Mz+2/WboM2rOM2d7q5df1GYQ+CF8BoHQ?= =?utf-8?q?8v1wIuPx38Oy0nU972D9dma6YyGFtYhYccAFqUzX/XCbtxqwLXDpwM93IE0kI+V72?= =?utf-8?q?7Fk8tUkQ4R9JKFLkgppVRrFHwJyGH9jOfPwMLwmldR6TETGxpahGelKh5MW+7BjnT?= =?utf-8?q?DmBXNX8pqtuc9lehB27jNtQ7AnEK+fkkvYesIoGfsJiDLXCJsBs7UnVRf6MvXc7hq?= =?utf-8?q?ZVOfoiittj4nJlEKXaX9RJw7UVE0q3G1ehiNXVUXd53cJImhiEUIekllnRZgdAGhh?= =?utf-8?q?I/NeTUbeT+td/yoKDovT1xNpN2HJeTpZxwsXKGjeibetUiovdiYu2vtzDtGj69W+Y?= =?utf-8?q?vZ0jRrYPAd/JhPHnSUpJJy6R8G/y4sYQ5yR1ioyayiSnpYNyTsT+d0/8dpNOh/1pd?= =?utf-8?q?yui9OC9LDEQuo1NJNxCZM665gkedzgZEGbM/OT4XRs8wmZb4WnE9h9rUSMsXp8qZk?= =?utf-8?q?2B3xOrGIqB6xy17x+npvH0t8HVrUa2UXoFThw/zKGSUF6JD8sBW5s5Wt4dE+aadts?= =?utf-8?q?BN+ZdJSFLnrhq4O8U4ri28ARhoQxyCDuzCASincfU4Y3JB6C762MQ7PZ3nMrxxv01?= =?utf-8?q?RY6JbUJz8yM0QIreQA0jsMML8V2X7sloVEjCL+Fa8GyF99O3O00MTVJAHsSTHt5UX?= =?utf-8?q?8pOB3N0A1skYIeAF+3Fe9hyt/Gyp34sSNpIwTGlwHIOlLO1XwXqu1SW7Wh6bor8eW?= =?utf-8?q?J1smyf4qu9QI/S2n/SuYBeT+fQjpWEhiC4G7hdMNz86xZ3nBqt7YVIlEBb0iK0rH2?= =?utf-8?q?M9JShb2KTLfpnVdGDDUfOuoY2rNhKY2jtis6u5FyVKTb3QuEozRqAG5GBkZ+f5k7H?= =?utf-8?q?fbZmof/pgD+/VDEqemZNPLXQxiN6BnIe+xN8cSXo1ZlB/YUr/EZ+9NoiOJyhcjqpZ?= =?utf-8?q?sM5RK6M4UFUDJlSd7su73Fc5YLnykBNiNBJRKtNyhZbyj1SYCjV1+C09ckgHYWhZO?= =?utf-8?q?4oZR9DrKVg+?= 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)(82310400026)(1800799024)(376014)(35042699022)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 11:09:40.5900 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 860b4816-fcfc-46a7-8060-08dcc8e43e7c 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: DU2PEPF00028D0B.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9393 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, 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, As it stands, the pretty printing of GCC's vecs by gdbhooks.py only handles vectors with vl_embed layout. As such, when encountering a vec with vl_ptr layout, GDB would print a diagnostic like: gdb.error: There is no member or method named m_vecpfx. when (e.g.) any such vec occurred in a backtrace. This patch extends VecPrinter.children to also handle vl_ptr vectors. Manually tested by verifying that vl_embed vectors still print correctly and empty vl_ptr vectors no longer trigger errors. OK for trunk? Thanks, Alex diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py index 7a64c03b8ac..2c0a074d0b6 100644 --- a/gcc/gdbhooks.py +++ b/gcc/gdbhooks.py @@ -453,6 +453,25 @@ class PassPrinter: ###################################################################### +VEC_KIND_EMBED = 0 +VEC_KIND_PTR = 1 + +""" +Given a vec or pointer to vec, return its layout (embedded or space +efficient). +""" +def get_vec_kind(val): + typ = val.type + if typ.code == gdb.TYPE_CODE_PTR: + typ = typ.target() + kind = typ.template_argument(2).name + if kind == "vl_embed": + return VEC_KIND_EMBED + elif kind == "vl_ptr": + return VEC_KIND_PTR + else: + assert False, f"unxpected vec kind {kind}" + class VecPrinter: # -ex "up" -ex "p bb->preds" def __init__(self, gdbval): @@ -467,11 +486,16 @@ class VecPrinter: return '0x%x' % intptr(self.gdbval) def children (self): - if intptr(self.gdbval) == 0: + val = self.gdbval + if intptr(val) != 0 and get_vec_kind(val) == VEC_KIND_PTR: + val = val['m_vec'] + + if intptr(val) == 0: return - m_vecpfx = self.gdbval['m_vecpfx'] + + assert get_vec_kind(val) == VEC_KIND_EMBED + m_vecpfx = val['m_vecpfx'] m_num = m_vecpfx['m_num'] - val = self.gdbval typ = val.type if typ.code == gdb.TYPE_CODE_PTR: typ = typ.target()