* arm-tdep.c: Include "observer.h".
[deliverable/binutils-gdb.git] / gdb / dwarf2expr.h
index 31381c09e69cd7fb1084c5a74cdc05a077d1d51d..3858dc8d5fac914cce5fea738d7b8a7595c11c75 100644 (file)
@@ -1,6 +1,6 @@
 /* DWARF 2 Expression Evaluator.
 
-   Copyright (C) 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010
+   Copyright (C) 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
    Contributed by Daniel Berlin <dan@dberlin.org>.
@@ -41,7 +41,10 @@ enum dwarf_value_location
   DWARF_VALUE_LITERAL,
 
   /* The piece was optimized out.  */
-  DWARF_VALUE_OPTIMIZED_OUT
+  DWARF_VALUE_OPTIMIZED_OUT,
+
+  /* The piece is an implicit pointer.  */
+  DWARF_VALUE_IMPLICIT_POINTER
 };
 
 /* The dwarf expression stack.  */
@@ -75,6 +78,9 @@ struct dwarf_expr_context
   /* Target address size in bytes.  */
   int addr_size;
 
+  /* Offset used to relocate DW_OP_addr argument.  */
+  CORE_ADDR offset;
+
   /* An opaque argument provided by the caller, which will be passed
      to all of the callback functions.  */
   void *baton;
@@ -93,6 +99,9 @@ struct dwarf_expr_context
   /* Return the CFA for the frame.  */
   CORE_ADDR (*get_frame_cfa) (void *baton);
 
+  /* Return the PC for the frame.  */
+  CORE_ADDR (*get_frame_pc) (void *baton);
+
   /* Return the thread-local storage address for
      DW_OP_GNU_push_tls_address.  */
   CORE_ADDR (*get_tls_address) (void *baton, CORE_ADDR offset);
@@ -117,8 +126,9 @@ struct dwarf_expr_context
   /* Location of the value.  */
   enum dwarf_value_location location;
 
-  /* For VALUE_LITERAL, a the current literal value's length and
-     data.  */
+  /* For DWARF_VALUE_LITERAL, a the current literal value's length and
+     data.  For DWARF_VALUE_IMPLICIT_POINTER, LEN is the offset of the
+     target DIE.  */
   ULONGEST len;
   const gdb_byte *data;
 
@@ -182,6 +192,15 @@ struct dwarf_expr_piece
       /* The length of the available data.  */
       ULONGEST length;
     } literal;
+
+    /* Used for DWARF_VALUE_IMPLICIT_POINTER.  */
+    struct
+    {
+      /* The referent DIE from DW_OP_GNU_implicit_pointer.  */
+      ULONGEST die;
+      /* The byte offset into the resulting data.  */
+      LONGEST offset;
+    } ptr;
   } v;
 
   /* The length of the piece, in bits.  */
This page took 0.024018 seconds and 4 git commands to generate.