public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: make "maintenance info line-table" show relocated addresses again
@ 2023-03-20 16:30 Simon Marchi
  2023-03-20 21:35 ` Andrew Burgess
  0 siblings, 1 reply; 16+ messages in thread
From: Simon Marchi @ 2023-03-20 16:30 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-03-22 19:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 16:30 [PATCH] gdb: make "maintenance info line-table" show relocated addresses again Simon Marchi
2023-03-20 21:35 ` Andrew Burgess
2023-03-21  1:18   ` Simon Marchi
2023-03-21  9:23     ` Andrew Burgess
2023-03-22  1:35       ` Simon Marchi
2023-03-22 10:26         ` [PATCH 0/1] gdb: Update doc of the "maintenance info line-table" Lancelot SIX
2023-03-22 10:26           ` [PATCH 1/1] " Lancelot SIX
2023-03-22 13:59             ` Simon Marchi
2023-03-22 16:48               ` Lancelot SIX
2023-03-22 17:20               ` [PATCH v2] " Lancelot SIX
2023-03-22 14:58             ` [PATCH 1/1] " Eli Zaretskii
2023-03-22 13:46         ` [PATCH] gdb: make "maintenance info line-table" show relocated addresses again Tom de Vries
2023-03-22 13:47           ` Simon Marchi
2023-03-22 15:17             ` [PATCH] gdb/testsuite: adjust test cases to previous "maintenance info line-table" change Simon Marchi
2023-03-22 18:01               ` Tom de Vries
2023-03-22 19:14                 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).