From: Cary Coutant Date: Tue, 7 Jun 2011 23:39:28 +0000 (+0000) Subject: * dwarf.c: Fix conversion to TU number. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad6b52dd0b70f6f9702b648dcbe855cd272b6bf0;p=binutils-gdb.git * dwarf.c: Fix conversion to TU number. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 859fbe9da3f..74dad732c5a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2011-06-07 Cary Coutant + + * dwarf.c: Fix conversion to TU number. + 2011-06-02 Nick Clifton * resres.c: Fix spelling typo. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index db76ce8ef2f..46c454adf68 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -5266,8 +5266,8 @@ display_gdb_index (struct dwarf_section *section, { cu = byte_get_little_endian (constant_pool + cu_vector_offset + 4 + j * 4, 4); /* Convert to TU number if it's for a type unit. */ - if (cu >= cu_list_elements) - printf (" T%lu", (unsigned long) (cu - cu_list_elements)); + if (cu >= cu_list_elements / 2) + printf (" T%lu", (unsigned long) (cu - cu_list_elements / 2)); else printf (" %lu", (unsigned long) cu); }