+2004-06-06 Paul Brook <paul@codesourcery.com>
+
+ * gdb/dwarf2-frame.c (decode_frame_entry_1): Decode version 3 CIE
+ records.
+
2004-06-08 Paul N. Hilfinger <Hilfinger@gnat.com>
* ada-lang.c (lookup_symbol_in_language): New function to allow
/* This is a CIE. */
struct dwarf2_cie *cie;
char *augmentation;
+ unsigned int cie_version;
/* Record the offset into the .debug_frame section of this CIE. */
cie_pointer = start - unit->dwarf_frame_buffer;
cie->encoding = encoding_for_size (unit->addr_size);
/* Check version number. */
- if (read_1_byte (unit->abfd, buf) != DW_CIE_VERSION)
+ cie_version = read_1_byte (unit->abfd, buf);
+ if (cie_version != 1 && cie_version != 3)
return NULL;
buf += 1;
read_signed_leb128 (unit->abfd, buf, &bytes_read);
buf += bytes_read;
- cie->return_address_register = read_1_byte (unit->abfd, buf);
- buf += 1;
+ if (cie_version == 1)
+ {
+ cie->return_address_register = read_1_byte (unit->abfd, buf);
+ bytes_read = 1;
+ }
+ else
+ cie->return_address_register = read_unsigned_leb128 (unit->abfd, buf,
+ &bytes_read);
+ buf += bytes_read;
cie->saw_z_augmentation = (*augmentation == 'z');
if (cie->saw_z_augmentation)