mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
gdb/dwarf: use dwarf2_per_cu::ref_addr_size in one spot
I noticed this spot that could use dwarf2_per_cu::ref_addr_size, instead of implementing the same logic. Change-Id: I894ef1dcaa687c659e49bc1eb433e42818038cf2 Approved-By: Andrew Burgess <aburgess@redhat.com> Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
@@ -3822,12 +3822,7 @@ cutu_reader::skip_one_attribute (dwarf_form form, const gdb_byte *info_ptr)
|
||||
switch (form)
|
||||
{
|
||||
case DW_FORM_ref_addr:
|
||||
/* In DWARF 2, DW_FORM_ref_addr is address sized; in DWARF 3
|
||||
and later it is offset sized. */
|
||||
if (m_cu->header.version == 2)
|
||||
return info_ptr + m_cu->header.addr_size;
|
||||
else
|
||||
return info_ptr + m_cu->header.offset_size;
|
||||
return info_ptr + m_cu->per_cu->ref_addr_size ();
|
||||
|
||||
case DW_FORM_GNU_ref_alt:
|
||||
return info_ptr + m_cu->header.offset_size;
|
||||
|
||||
Reference in New Issue
Block a user