diff options
author | Tom Tromey <tromey@redhat.com> | 2010-04-20 17:33:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-04-20 17:33:14 +0000 |
commit | 2dc7f7b33b425c6c19078f29e4e8c9e0ddca41e6 (patch) | |
tree | 2f7cddc6a08da2a6aea9a1c47a86b10197c7eb8e /gdb/dwarf2-frame.c | |
parent | ce4b068214ec304f48cc191f9e912549922d9472 (diff) | |
download | gdb-2dc7f7b33b425c6c19078f29e4e8c9e0ddca41e6.zip gdb-2dc7f7b33b425c6c19078f29e4e8c9e0ddca41e6.tar.gz gdb-2dc7f7b33b425c6c19078f29e4e8c9e0ddca41e6.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 47a2cf1..33d001c 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -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; |