diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-05-17 14:51:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-05-17 14:51:30 +0000 |
commit | 5db3fa4726f1f479e3613439218c7b7843b0e316 (patch) | |
tree | 95728b3a379dfb8d6209d74f5e2ee6acb0fd6985 | |
parent | f14967e0d11973c8f6f0fb93b465268e5e3799ec (diff) | |
download | gdb-5db3fa4726f1f479e3613439218c7b7843b0e316.tar.gz |
* dwarf-frame.c: Add and fix some comments.
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/dwarf-frame.c | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 568600fdf3a..421a6068d3c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2003-05-17 Mark Kettenis <kettenis@gnu.org> + * dwarf-frame.c: Add and fix some comments. + * i386-tdep.c (i386_frame_cache, i386_sigtramp_frame_cache, i386_extract_struct_value_address, i386_svr4_sigcontext_addr): Use extract_unsigned_integer instead of extract_address. diff --git a/gdb/dwarf-frame.c b/gdb/dwarf-frame.c index 6279171c7ee..a1d963491fa 100644 --- a/gdb/dwarf-frame.c +++ b/gdb/dwarf-frame.c @@ -796,6 +796,20 @@ read_initial_length (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) /* Pointer encoding helper functions. */ +/* GCC supports exception handling based on DWARF2 CFI. However, for + technical reasons, it encodes addresses in its FDE's in a different + way. Several "pointer encodings" are supported. The encoding + that's used for a particular FDE is determined by the 'R' + augmentation in the associated CIE. The argument of this + augmentation is a single byte. + + The address can be encoded as 2 bytes, 4 bytes, 8 bytes, or as a + LEB128. This is encoded in bits 0, 1 and 2. Bit 3 encodes whether + the address is signed or unsigned. Bits 4, 5 and 6 encode how the + address should be interpreted (absolute, relative to the current + position in the FDE, ...). Bit 7, indicates that the address + should be dereferenced. */ + static unsigned char encoding_for_size (unsigned int size) { @@ -958,7 +972,7 @@ add_fde (struct comp_unit *unit, struct dwarf_fde *fde) #define DW64_CIE_ID ~0 #endif -/* Read and the CIE or FDE in BUF and decode it. */ +/* Read a CIE or FDE in BUF and decode it. */ static char * decode_frame_entry (struct comp_unit *unit, char *buf, int eh_frame_p) |