2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief Dwarf debug output support.
9 * @author Matthias Braun
11 #ifndef FIRM_BE_BEDWARF_H
12 #define FIRM_BE_BEDWARF_H
16 typedef struct parameter_dbg_info_t {
17 const ir_entity *entity;
18 const arch_register_t *reg;
19 } parameter_dbg_info_t;
21 /** initialize and open debug handle */
22 void be_dwarf_open(void);
24 /** close a debug handler. */
25 void be_dwarf_close(void);
27 /** start a compilation unit */
28 void be_dwarf_unit_begin(const char *filename);
30 /** end compilation unit */
31 void be_dwarf_unit_end(void);
33 /** output debug info necessary right before defining a method */
34 void be_dwarf_method_before(const ir_entity *ent,
35 const parameter_dbg_info_t *infos);
37 /** output debug info right before beginning to output assembly instructions */
38 void be_dwarf_method_begin(void);
40 /** debug for a method end */
41 void be_dwarf_method_end(void);
43 /** dump a variable in the global type */
44 void be_dwarf_variable(const ir_entity *ent);
46 /** Set "location" in the sourcefile corresponding to the following
47 * assembly instructions */
48 void be_dwarf_location(dbg_info *dbgi);
50 /** set base register that points to callframe */
51 void be_dwarf_callframe_register(const arch_register_t *reg);
53 /** set offset from base register that points to the callframe.
54 * Note: callframe is defined as in the dwarf documentation here which is the
55 * stackpointer before the call has happened. (Which would be the beginning of
56 * the between type in our backend) */
57 void be_dwarf_callframe_offset(int offset);
60 * Indicate at which offset (relative to the CFA) a caller saved register has
63 void be_dwarf_callframe_spilloffset(const arch_register_t *reg, int offset);