This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: [PATCH/i386newframe/RFC] DWARF CFI frame unwinder


Mark, fyi,

+    case REG_SAVED_REG:
+      *optimizedp = 0;
+      *lvalp = lval_register;
+      *addrp = 0;
+      *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
+      if (valuep)
+	{
+	  /* Read the value from the register.  */
+	  frame_unwind_register (next_frame, *realnump, valuep);
+	}
+      break;
+

Set *addrp to the register offset hack (Otherwize something mysterious fails. What? I don't remember).


Using the frame obstack for memory looks right.

+static CORE_ADDR
+dwarf_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+  struct dwarf_frame_cache *cache = dwarf_frame_cache (next_frame, this_cache);
+
+  return cache->cfa;
+}

This isn't right. It should return DW_AT_frame_base. However, since dwarf2expr.c doesn't yet use these methods it doesn't [?] really matter. Only affects ``info frame''.


I suspect things like execute_stack_op might need more cleanups. A dead target, or bad memory read, can throw an error.

Looks like the interface works (and oh so much cleaner than the old code) :-)

Andrew




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