| Message ID | 20260501073117.2962398-1-luis.machado@amd.com |
|---|---|
| State | New |
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id A002F4374200 for <patchwork@sourceware.org>; Fri, 1 May 2026 07:32:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A002F4374200 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=gL9VXhw1 X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazlp170100005.outbound.protection.outlook.com [IPv6:2a01:111:f403:c112::5]) by sourceware.org (Postfix) with ESMTPS id B5A8B43B5518 for <gdb-patches@sourceware.org>; Fri, 1 May 2026 07:31:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5A8B43B5518 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5A8B43B5518 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c112::5 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1777620704; cv=pass; b=CyGywkOEMVJ9ZLk2UriSlg5iY7TAvpnyiEyv10rGhunBNEo3t8o49ieaHzW6b+dH1FSvIV1N1Hnv7MmXOIBnUGUnvCTwz0DwvTaFDmTYHUY2cJJajykxKrS5eEGn5nyReH8WsTba7bkxNBFbLz2nxItFyfjPDugwlrHeKMCDVJ0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1777620704; c=relaxed/simple; bh=50MbaZvUMyz3+KTt9jkZLQ7xiKnFDuXqJdiy5RQsShQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jCRR5kz/E+sFhibA4KUdgvTmh1nJ3mXKQz5Ns+iM7Jb0Ep+EGy09qaqjgcZlR55TpO7AHLth7MEeJ8l+YpLkwxijyvUsM7h8PsRrbk3ZMWerHGHRxTQXRfeSAzXmPDNJlPnfUqHTBcUoy9W7/L6c17jS8WbIdZt/WCFKuAxTuN0= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5A8B43B5518 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vAxqNawsnfwhkuHJ1xiwrC7P/wbazWmffD2YD7YnPyGzdBOnYD1NWOPBJ3fhdkIr9SWFe75A9DP9XY+efC3U53DMnA3pc2T+MydmPQyAspUm3WGIYCBggVtk5VRhmUkrzy4jlOau5bYs0TSUbcrQtsLTJYBkfVRAXazDleOtJvKLQyT785IcOx813aBxZ3zqsl0VMSNw70epJn9lR4MMXyLsbNuedNEunYaMmE22Vge2IdW3pGZvXtIQPhapSDhgAl3PrV58N74DtmgTPcjd2fKiu3CFbGg0sofJK22I+NuVN+LR4EUy1ZdEjMEoKzLNoPrZCElT7/iJTZz4OEKzQA== 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=ZIi3Jif5C07LXeke+tCmFv6sNdlHnA6qmpscvznYs4c=; b=lnMUjTr4tCgWPfLCFkXl4FG8BFIVNpl7ebjFc/L1P2nkgID5Np6q8gAb/DissGao/iImEsX+hVyA5wyiWhB/MVaqwSJBtxp64s+0xUzd67tLLMH6bR6OS8sWSpZ0d43YIwBf/S00Stoi4emHW6TrNhrb+sWauMWM3dHymH6XsWwRwOwZw3cqP125gJPsmDTfpDYVvbaJXYCsxX6JW43K6FRJhTyB7MDkPUeUfV4K+zIJLlN02SO2kfRfzPCQ/eEUfJ/cWflPSQq8Q0Auv4BInNEvgW1gTZFvLqVzgQR0FpJ3wtkVgV2/65Ebzz4z7THQJGV13AHC9TgFBEEPNV8bYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZIi3Jif5C07LXeke+tCmFv6sNdlHnA6qmpscvznYs4c=; b=gL9VXhw1mqmMPTX96pbSdk83W9/GbI3Ci0pGHfx33V4dNMlpoaOxEV+Xh+ALl25CDBPTB9xBBIAmsYQWbDgwn81WXS58j/C1XPoymz4hxrRNXslCiF7K5xHOsiqD7k7zj+1zZoBLO14yC65HrjqzL6xIuCWRuHoGk9/o6VbvM74= Received: from SJ0PR13CA0018.namprd13.prod.outlook.com (2603:10b6:a03:2c0::23) by MW4PR12MB7438.namprd12.prod.outlook.com (2603:10b6:303:219::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9870.21; Fri, 1 May 2026 07:31:37 +0000 Received: from SJ5PEPF000001CB.namprd05.prod.outlook.com (2603:10b6:a03:2c0:cafe::13) by SJ0PR13CA0018.outlook.office365.com (2603:10b6:a03:2c0::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9891.5 via Frontend Transport; Fri, 1 May 2026 07:31:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by SJ5PEPF000001CB.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.9 via Frontend Transport; Fri, 1 May 2026 07:31:37 +0000 Received: from ctr-rack32-mi300x-1.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 1 May 2026 02:31:36 -0500 From: Luis Machado <luis.machado@amd.com> To: <gdb-patches@sourceware.org> Subject: [PATCH] Remove unused str_backtrace_unavailable variable Date: Fri, 1 May 2026 02:31:17 -0500 Message-ID: <20260501073117.2962398-1-luis.machado@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001CB:EE_|MW4PR12MB7438:EE_ X-MS-Office365-Filtering-Correlation-Id: f522c81e-c74c-41bf-ae5a-08dea753adc8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700016|1800799024|376014|18002099003|56012099003; X-Microsoft-Antispam-Message-Info: rRpipVg78h8olN4k+onPu9VotmiOIkXjcrIcDZpmIiXi8fn5qyyRqBmB3mexFxoz2ac6qijDu4FBbIvtF3liNqQIZzAaG3JHbhPptulI3GZBCUCMgPmW1eTuS71Z745Ju6f6UYUCWsuH7DIRSQdzdPaYhUSNaaWC4uQKPPzkSchDfJ24fdm7BYEudNjxSJdgYqyvVmxtZHzpqzjjX8QTnPLwOn04efUzP5ofQSp48wZ6xfsMgAsJxtTq7oTd5VEQcGyLubo1hVg7W9YMJxlq9IhtmFziOnKglPbKitlOyCipV0ZtEWkORlKBtzJMpZr+tszQlgUR1u8YthVa0DXJjvoEMutavVIEzcGuIAIDlC6A3CkPSzu/85S6aIkm6mm+r2KsZE3AU1LWSxERkhJTfHWX0e/rGvq4QhPrD4M3BNQEFGde9HX8lbbt9oLnSC7xcqBPTMDq/+BGiqw3tZgHlwm6Pl8F7ES74hHtYj4FghkQMrYzZQdzp5hfNPCCK+vy59SCCdQIqqWNC2YlON3XInQshASmyZ1xvosBonOOHbInBtf1+MU7eLZUn/oRSky6VSOB2uQrixKIEOYg4gM9H21j9LPDP+AM/+ez7fUCYJhK6f8g6YZY49/29cOtu10ApdSI1bZkIjlBVvyGz+4gzB5kJSdhrRBhiy/aIIGUhcCuRt7aDqZLuMnn7gJzOd2PrmxD9aw2DC413AYc0fKZ7DUrj5s6CnuCgJ2f1TXozMg= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700016)(1800799024)(376014)(18002099003)(56012099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0rsrKAuos/O1IBnE72AYVLFcIe05FR9V5u9lNmgi8PmfKVxVHLReyQxPoL6xNswOj8+VoQlT9rwKx6rkI4dhhnsRHrn4j2NoMZc6hq6ZSvWLlex5KsxhNS/LeV4pt/ebubIVIAMGlcwHyCFOP76Tc/CE9wzQ0UiKBpKE03+olcMSQ1TessPA4ZmpuTK/f0G7QYSZbQpZW9fXJUHmgAP5DpCdiiWen40otvDrl83rz5XMYsSHAiYPb5KnKl3VGTxYzgifBT0RPJ4ecMD+ctcsq2WEdZ3OeV5c4SNYx2pG9NU6YVfFvlVFNCEnAhvxqbZqoLQHpijR9Y9hFYsf4By8cIJQ5ezv1/JAcUp78EnJQVRiP1fco8FtIvRwKGnAcBhJvI18D7tF3wY3NZG23Z5o9bf/4bCOesbpVI9oqjH4ZjUnMgMsLXBkd3+Qkg442tcg X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2026 07:31:37.1836 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f522c81e-c74c-41bf-ae5a-08dea753adc8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001CB.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7438 X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, LOCAL_AUTHENTICATION_FAIL_SPF, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Remove unused str_backtrace_unavailable variable
|
|
Commit Message
Machado, Luis
May 1, 2026, 7:31 a.m. UTC
The str_backtrace_unavailable variable is initialized but never used anywhere in the codebase. --- gdb/bt-utils.c | 2 -- 1 file changed, 2 deletions(-)
Comments
>>>>> "Luis" == Luis Machado <luis.machado@amd.com> writes:
Luis> The str_backtrace_unavailable variable is initialized but never
Luis> used anywhere in the codebase.
Thanks.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
On 5/1/26 3:31 AM, Luis Machado wrote: > The str_backtrace_unavailable variable is initialized but never > used anywhere in the codebase. > --- > gdb/bt-utils.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/gdb/bt-utils.c b/gdb/bt-utils.c > index 7fc8d04f306..21a291c3df3 100644 > --- a/gdb/bt-utils.c > +++ b/gdb/bt-utils.c > @@ -146,7 +146,6 @@ gdb_internal_backtrace_1 () > #endif > > static const char *str_backtrace = "----- Backtrace -----\n"; > -static const char *str_backtrace_unavailable = "Backtrace unavailable\n"; > > #endif /* GDB_PRINT_INTERNAL_BACKTRACE */ > > @@ -157,7 +156,6 @@ gdb_internal_backtrace_init_str () > { > #ifdef GDB_PRINT_INTERNAL_BACKTRACE > str_backtrace = _("----- Backtrace -----\n"); > - str_backtrace_unavailable = _("Backtrace unavailable\n"); > #endif > } Seems quite obvious to me, but I would wait for Andrew to confirm that this wasn't meant to be used somewhere. For instance, in the libbacktrace_error function. But I think the message there is clear, so I'd be fine with just deleting the variable. Simon
On 01/05/2026 15:17, Simon Marchi wrote: > On 5/1/26 3:31 AM, Luis Machado wrote: >> The str_backtrace_unavailable variable is initialized but never >> used anywhere in the codebase. >> --- >> gdb/bt-utils.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/gdb/bt-utils.c b/gdb/bt-utils.c >> index 7fc8d04f306..21a291c3df3 100644 >> --- a/gdb/bt-utils.c >> +++ b/gdb/bt-utils.c >> @@ -146,7 +146,6 @@ gdb_internal_backtrace_1 () >> #endif >> >> static const char *str_backtrace = "----- Backtrace -----\n"; >> -static const char *str_backtrace_unavailable = "Backtrace unavailable\n"; >> >> #endif /* GDB_PRINT_INTERNAL_BACKTRACE */ >> >> @@ -157,7 +156,6 @@ gdb_internal_backtrace_init_str () >> { >> #ifdef GDB_PRINT_INTERNAL_BACKTRACE >> str_backtrace = _("----- Backtrace -----\n"); >> - str_backtrace_unavailable = _("Backtrace unavailable\n"); >> #endif >> } > > Seems quite obvious to me, but I would wait for Andrew to confirm that > this wasn't meant to be used somewhere. For instance, in the > libbacktrace_error function. But I think the message there is clear, so > I'd be fine with just deleting the variable. Sorry, I just pushed this. But we can still wait for Andrew to chime in and tell us otherwise.
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> Seems quite obvious to me, but I would wait for Andrew to confirm that
Simon> this wasn't meant to be used somewhere. For instance, in the
Simon> libbacktrace_error function. But I think the message there is clear, so
Simon> I'd be fine with just deleting the variable.
I considered this before approving but my view is that if it is needed,
it is trivial to revert a deletion like this.
I'd generally consider the removal of an unused object to be obvious,
with the caveats:
1. If it looks like maybe it *ought* to be used, then send an RFA
instead;
2. Be sure to check Insight as it uses a few things that are otherwise
unused.
Tom
Thanks for the heads up on Insight. For context, this came up when using llvm. It got grumpy about the unused-but-initialized value.
diff --git a/gdb/bt-utils.c b/gdb/bt-utils.c index 7fc8d04f306..21a291c3df3 100644 --- a/gdb/bt-utils.c +++ b/gdb/bt-utils.c @@ -146,7 +146,6 @@ gdb_internal_backtrace_1 () #endif static const char *str_backtrace = "----- Backtrace -----\n"; -static const char *str_backtrace_unavailable = "Backtrace unavailable\n"; #endif /* GDB_PRINT_INTERNAL_BACKTRACE */ @@ -157,7 +156,6 @@ gdb_internal_backtrace_init_str () { #ifdef GDB_PRINT_INTERNAL_BACKTRACE str_backtrace = _("----- Backtrace -----\n"); - str_backtrace_unavailable = _("Backtrace unavailable\n"); #endif }