This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[dw-op-value] fix up FIXME comments


While cleaning up the dw-op-value branch for upstream submission, I saw
that I had added some FIXME comments.

This patch cleans those up.

Tom

diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 68199d4..806682f 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -363,7 +363,13 @@ execute_stack_op (gdb_byte *exp, ULONGEST len, int addr_size,
 
   if (ctx->location == DWARF_VALUE_REGISTER)
     result = read_reg (this_frame, result);
-  /* FIXME */
+  else if (ctx->location != DWARF_VALUE_MEMORY)
+    {
+      /* This is actually invalid DWARF, but if we ever do run across
+	 it somehow, we might as well support it.  So, instead, report
+	 it as unimplemented.  */
+      error (_("Not implemented: computing unwound register using explicit value operator"));
+    }
 
   free_dwarf_expr_context (ctx);
 
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 393dcd1..a673939 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -283,7 +283,9 @@ signed_address_type (struct gdbarch *gdbarch, int addr_size)
 static void
 require_composition (gdb_byte *op_ptr, gdb_byte *op_end, const char *op_name)
 {
-  /* FIXME: DW_OP_GNU_uninit?  */
+  /* It seems like DW_OP_GNU_uninit should be handled here.  However,
+     it doesn't seem to make sense for DW_OP_*_value, and it was not
+     checked at the other place that this function is called.  */
   if (op_ptr != op_end && *op_ptr != DW_OP_piece && *op_ptr != DW_OP_bit_piece)
     error (_("DWARF-2 expression error: `%s' operations must be "
 	     "used either alone or in conjuction with DW_OP_piece "
@@ -532,10 +534,12 @@ execute_stack_op (struct dwarf_expr_context *ctx,
                specific this_base method.  */
 	    (ctx->get_frame_base) (ctx->baton, &datastart, &datalen);
 	    dwarf_expr_eval (ctx, datastart, datalen);
+	    if (ctx->location == DWARF_VALUE_LITERAL
+		|| ctx->location == DWARF_VALUE_STACK)
+	      error (_("Not implemented: computing frame base using explicit value operator"));
 	    result = dwarf_expr_fetch (ctx, 0);
 	    if (ctx->location == DWARF_VALUE_REGISTER)
 	      result = (ctx->read_reg) (ctx->baton, result);
-	    /* FIXME: other DWARF_VALUE_*?? */
 	    result = result + offset;
 	    ctx->stack_len = before_stack_len;
 	    ctx->location = DWARF_VALUE_MEMORY;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]