mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user