mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* dwarf2-frame.c (decode_frame_entry_1): Handle CIE version 4.
(struct dwarf2_cie) <segment_size>: New field. * dwarf2read.c (partial_read_comp_unit_head): Accept DWARF 4. (skip_one_die): Handle DW_FORM_flag_present, DW_FORM_sec_offset, DW_FORM_exprloc. (read_attribute_value): Handle DW_FORM_flag_present, DW_FORM_sec_offset, DW_FORM_exprloc. (dump_die_shallow): Likewise. (attr_form_is_section_offset): Handle DW_FORM_sec_offset. (dwarf2_const_value): Handle DW_FORM_exprloc. (attr_form_is_block): Likewise. (struct line_header) <maximum_ops_per_instruction>: New field. (dwarf_decode_line_header): Set new field. (dwarf_decode_lines): Handle new field.
This commit is contained in:
@@ -85,6 +85,9 @@ struct dwarf2_cie
|
||||
|
||||
/* The version recorded in the CIE. */
|
||||
unsigned char version;
|
||||
|
||||
/* The segment size. */
|
||||
unsigned char segment_size;
|
||||
};
|
||||
|
||||
struct dwarf2_cie_table
|
||||
@@ -1714,7 +1717,7 @@ decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
|
||||
|
||||
/* Check version number. */
|
||||
cie_version = read_1_byte (unit->abfd, buf);
|
||||
if (cie_version != 1 && cie_version != 3)
|
||||
if (cie_version != 1 && cie_version != 3 && cie_version != 4)
|
||||
return NULL;
|
||||
cie->version = cie_version;
|
||||
buf += 1;
|
||||
@@ -1738,6 +1741,20 @@ decode_frame_entry_1 (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
|
||||
augmentation += 2;
|
||||
}
|
||||
|
||||
if (cie->version >= 4)
|
||||
{
|
||||
/* FIXME: check that this is the same as from the CU header. */
|
||||
cie->addr_size = read_1_byte (unit->abfd, buf);
|
||||
++buf;
|
||||
cie->segment_size = read_1_byte (unit->abfd, buf);
|
||||
++buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
cie->addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
|
||||
cie->segment_size = 0;
|
||||
}
|
||||
|
||||
cie->code_alignment_factor =
|
||||
read_unsigned_leb128 (unit->abfd, buf, &bytes_read);
|
||||
buf += bytes_read;
|
||||
|
||||
Reference in New Issue
Block a user