From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id C3CCA3858413 for ; Mon, 20 Mar 2023 16:30:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C3CCA3858413 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 2B7691E0D3; Mon, 20 Mar 2023 12:30:04 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] gdb: make "maintenance info line-table" show relocated addresses again Date: Mon, 20 Mar 2023 12:30:03 -0400 Message-Id: <20230320163003.32960-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3497.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_SOFTFAIL,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 List-Id: Commit 1acc9dca423f ("Change linetables to be objfile-independent") changed "maintenance info line-table" to print unrelocated addresses instead of relocated. This breaks a few tests on systems where that matters. The ones I see are: Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/consecutive.exp ... FAIL: gdb.base/consecutive.exp: stopped at bp, 2nd instr (missing hex prefix) Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/async.exp ... FAIL: gdb.base/async.exp: stepi& FAIL: gdb.base/async.exp: nexti& FAIL: gdb.base/async.exp: finish& These tests run "maintenance info line-table" to record the address of some lines, and then use these addresses in expected patterns. For the time being, I suggest simply reverting the command to show relocated addresses. Change-Id: I59558f167e13e63421c9e0f2cad192e7c95c10cf --- gdb/symmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 54dc570d282f..8296857d06c3 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -996,7 +996,7 @@ maintenance_print_one_line_table (struct symtab *symtab, void *data) else uiout->field_string ("line", _("END")); uiout->field_core_addr ("address", objfile->arch (), - CORE_ADDR (item->raw_pc ())); + item->pc (objfile)); uiout->field_string ("is-stmt", item->is_stmt ? "Y" : ""); uiout->field_string ("prologue-end", item->prologue_end ? "Y" : ""); uiout->text ("\n"); -- 2.40.0