This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] add offset support to DWARF2_FRAME_REG_CFA
Thanks! You seemed to have forgotten about my suggestion to introduce
DWARF2_FRAME_REG_CFA_OFFSET. The problem is that as-is, your patch
seems to break sparc64 and cris. By introducing
DWARF2_FRAME_CFA_OFFSET all existing code will be safe.
I see.
So here is an updated patch.
Is it OK now?
Thanks,
Christophe.
2005-11-25 Christophe Lyon <christophe.lyon@st.com>
* dwarf2-frame.c: (dwarf2_frame_prev_register): handle
DWARF2_FRAME_REG_CFA_OFFSET
* dwarf2-frame.h: add DWARF2_FRAME_REG_CFA_OFFSET
to enum dwarf2_frame_reg_rule
Index: dwarf2-frame.c
===================================================================
--- dwarf2-frame.c (revision 96)
+++ dwarf2-frame.c (working copy)
@@ -918,6 +921,19 @@
}
break;
+ case DWARF2_FRAME_REG_CFA_OFFSET:
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_typed_address (valuep, builtin_type_void_data_ptr,
+ cache->cfa + cache->reg[regnum].loc.offset);
+ }
+ break;
+
case DWARF2_FRAME_REG_RA_OFFSET:
*optimizedp = 0;
*lvalp = not_lval;
Index: dwarf2-frame.h
===================================================================
--- dwarf2-frame.h (revision 96)
+++ dwarf2-frame.h (working copy)
@@ -55,7 +55,8 @@
used internally by GDB. */
DWARF2_FRAME_REG_RA, /* Return Address. */
DWARF2_FRAME_REG_RA_OFFSET, /* Return Address with offset. */
- DWARF2_FRAME_REG_CFA /* Call Frame Address. */
+ DWARF2_FRAME_REG_CFA, /* Call Frame Address. */
+ DWARF2_FRAME_REG_CFA_OFFSET /* Call Frame Address with offset. */
};
/* Register state. */