frame.c: Somewhat explain `FDE'.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Fri, 23 Oct 1998 02:25:09 +0000 (02:25 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Fri, 23 Oct 1998 02:25:09 +0000 (02:25 +0000)
        * frame.c: Somewhat explain `FDE'.
        Suggested by Brendan Kehoe

From-SVN: r23243

gcc/ChangeLog
gcc/frame.c

index 5f6faa2ddbd40e564c2499d1fd1745873cf36fd0..64d18b41aa39ff45c216ae3aefdffbef7c9b729e 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 23 11:19:06 1998  Martin v. Löwis <loewis@informatik.hu-berlin.de>
+
+       * frame.c: Somewhat explain `FDE'.
+       Suggested by Brendan Kehoe
+
 Fri Oct 23 00:56:11 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
        * expr.c (pending_chain): Move up.
index b3d30c86f5ec90e5f376c175c91188b2ddf39250..ab803c90168d5c58e89ae640baa019f3acafc834 100644 (file)
@@ -71,6 +71,25 @@ typedef unsigned int  uaddr __attribute__ ((mode (pointer)));
 typedef          int  saddr __attribute__ ((mode (pointer)));
 typedef unsigned char ubyte;
 
+/* Terminology:
+   CIE - Common Information Element
+   FDE - Frame Descriptor Element
+
+   There is one per function, and it describes where the function code
+   is located, and what the register lifetimes and stack layout are
+   within the function.
+
+   The data structures are defined in the DWARF specfication, although
+   not in a very readable way (see LITERATURE).
+
+   Every time an exception is thrown, the code needs to locate the FDE
+   for the current function, and starts to look for exception regions
+   from that FDE. This works in a two-level search:
+   a) in a linear search, find the shared image (i.e. DLL) containing
+      the PC
+   b) using the FDE table for that shared object, locate the FDE using
+      binary search (which requires the sorting).  */   
+
 /* The first few fields of a CIE.  The CIE_id field is 0 for a CIE,
    to distinguish it from a valid FDE.  FDEs are aligned to an addressing
    unit boundary, but the fields within are unaligned.  */