+2020-06-29 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * dwarf.c (display_debug_str_offsets): Rename local variable
+ index to idx. Move to top of function.
+
2020-06-29 Alan Modra <amodra@gmail.com>
* dwarf.c: Use C style comments.
display_debug_str_offsets (struct dwarf_section *section,
void *file ATTRIBUTE_UNUSED)
{
+ unsigned long idx;
+
if (section->size == 0)
{
printf (_("\nThe %s section is empty.\n"), section->name);
printf (_(" Index Offset [String]\n"));
}
- unsigned long index;
- for (index = 0; length >= entry_length && curr < end; index ++)
+ for (idx = 0; length >= entry_length && curr < end; idx++)
{
dwarf_vma offset;
const unsigned char * string;
SAFE_BYTE_GET_AND_INC (offset, curr, entry_length, end);
if (dwo)
string = (const unsigned char *)
- fetch_indexed_string (index, NULL, entry_length, dwo);
+ fetch_indexed_string (idx, NULL, entry_length, dwo);
else
string = fetch_indirect_string (offset);
- printf (" %8lu %8s %s\n", index, dwarf_vmatoa ("x", offset),
+ printf (" %8lu %8s %s\n", idx, dwarf_vmatoa ("x", offset),
string);
}
}