diff options
author | Alan Modra <amodra@gmail.com> | 2022-07-21 14:54:54 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-07-21 14:54:54 +0930 |
commit | e82295b23d0e52b0dadffb8c0d0b99462cd20fa8 (patch) | |
tree | 1c2226fdfa07854bdcbd533dcb80a51657892143 /binutils | |
parent | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff (diff) | |
download | gdb-e82295b23d0e52b0dadffb8c0d0b99462cd20fa8.zip gdb-e82295b23d0e52b0dadffb8c0d0b99462cd20fa8.tar.gz gdb-e82295b23d0e52b0dadffb8c0d0b99462cd20fa8.tar.bz2 |
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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/dwarf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 99fb356..7d0a9ff 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -10671,9 +10671,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); |