path: root/ir/be/bedwarf.h
diff options
authorMatthias Braun <>2012-04-25 23:01:59 +0200
committerMatthias Braun <>2012-04-26 01:23:53 +0200
commitcc9d3be2116747d0d9d1445d3116c69ce041ae57 (patch)
treedffbc2f3b9707115859c2586b0ab9e9b5c54b522 /ir/be/bedwarf.h
parent5f6c325fb0ecef208f510046e0ade03a645b3540 (diff)
dwarf: initial support for callframe and params
- We now always output dwarf3 so we can use DW_OP_call_frame_cfa and avoid construction location lists, but just reuse the callframe info lists. - Backends have to emit debug info as callframe calculation changes: The ia32 backend has a preliminary implementation which assumes esp offset of frame_type_size at the beginning of a block (currently always true), the no-omit-fp mode assumes ebp relative addressing (which is correct except for the prolog/epilogue insns)
Diffstat (limited to 'ir/be/bedwarf.h')
1 files changed, 26 insertions, 2 deletions
diff --git a/ir/be/bedwarf.h b/ir/be/bedwarf.h
index a795f60..49f4cc4 100644
--- a/ir/be/bedwarf.h
+++ b/ir/be/bedwarf.h
@@ -27,6 +27,11 @@
#include "beabi.h"
+typedef struct parameter_dbg_info_t {
+ const ir_entity *entity;
+ const arch_register_t *reg;
+} parameter_dbg_info_t;
/** initialize and open debug handle */
void be_dwarf_open(void);
@@ -39,8 +44,12 @@ void be_dwarf_unit_begin(const char *filename);
/** end compilation unit */
void be_dwarf_unit_end(void);
-/** debug for a method begin */
-void be_dwarf_method_begin(const ir_entity *ent);
+/** output debug info necessary right before defining a method */
+void be_dwarf_method_before(const ir_entity *ent,
+ const parameter_dbg_info_t *infos);
+/** output debug info right before beginning to output assembly instructions */
+void be_dwarf_method_begin(void);
/** debug for a method end */
void be_dwarf_method_end(void);
@@ -52,4 +61,19 @@ void be_dwarf_variable(const ir_entity *ent);
* assembly instructions */
void be_dwarf_location(dbg_info *dbgi);
+/** set base register that points to callframe */
+void be_dwarf_callframe_register(const arch_register_t *reg);
+/** set offset from base register that points to the callframe.
+ * Note: callframe is defined as in the dwarf documentation here which is the
+ * stackpointer before the call has happened. (Which would be the beginning of
+ * the between type in our backend) */
+void be_dwarf_callframe_offset(int offset);
+ * Indicate at which offset (relative to the CFA) a caller saved register has
+ * been saved.
+ */
+void be_dwarf_callframe_spilloffset(const arch_register_t *reg, int offset);