public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/binutils-2_39-branch] PR29337, readelf CU/TU mixup in .gdb_index
@ 2022-07-21  5:34 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-07-21  5:34 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aabc43be527ff501a2fbed7c3641af544c22e47b

commit aabc43be527ff501a2fbed7c3641af544c22e47b
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Jul 21 14:54:54 2022 +0930

    PR29337, readelf CU/TU mixup in .gdb_index
    
    Commit 244e19c79111 changed a number of variables in display_gdb_index
    to count entries rather than words.
    
            PR 29337
            * dwarf.c (display_gdb_index): Correct use of cu_list_elements.
    
    (cherry picked from commit e82295b23d0e52b0dadffb8c0d0b99462cd20fa8)

Diff:
---
 binutils/dwarf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 2b1eec49422..63e6d2e5a04 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -10666,9 +10666,9 @@ display_gdb_index (struct dwarf_section *section,
 	      kind = GDB_INDEX_SYMBOL_KIND_VALUE (cu);
 	      cu = GDB_INDEX_CU_VALUE (cu);
 	      /* Convert to TU number if it's for a type unit.  */
-	      if (cu >= cu_list_elements / 2)
+	      if (cu >= cu_list_elements)
 		printf ("%cT%lu", num_cus > 1 ? '\t' : ' ',
-			(unsigned long) (cu - cu_list_elements / 2));
+			(unsigned long) (cu - cu_list_elements));
 	      else
 		printf ("%c%lu", num_cus > 1 ? '\t' : ' ', (unsigned long) cu);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-21  5:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21  5:34 [binutils-gdb/binutils-2_39-branch] PR29337, readelf CU/TU mixup in .gdb_index Alan Modra

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).