ia32: we cannot fold ia32_mode_E reloads
[libfirm] / ir / be / bedwarf.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief   Dwarf debug output support.
9  * @author  Matthias Braun
10  */
11 #ifndef FIRM_BE_BEDWARF_H
12 #define FIRM_BE_BEDWARF_H
13
14 #include "beabi.h"
15
16 typedef struct parameter_dbg_info_t {
17         const ir_entity       *entity;
18         const arch_register_t *reg;
19 } parameter_dbg_info_t;
20
21 /** initialize and open debug handle */
22 void be_dwarf_open(void);
23
24 /** close a debug handler. */
25 void be_dwarf_close(void);
26
27 /** start a compilation unit */
28 void be_dwarf_unit_begin(const char *filename);
29
30 /** end compilation unit */
31 void be_dwarf_unit_end(void);
32
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);
36
37 /** output debug info right before beginning to output assembly instructions */
38 void be_dwarf_method_begin(void);
39
40 /** debug for a method end */
41 void be_dwarf_method_end(void);
42
43 /** dump a variable in the global type */
44 void be_dwarf_variable(const ir_entity *ent);
45
46 /** Set "location" in the sourcefile corresponding to the following
47  * assembly instructions */
48 void be_dwarf_location(dbg_info *dbgi);
49
50 /** set base register that points to callframe */
51 void be_dwarf_callframe_register(const arch_register_t *reg);
52
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);
58
59 /**
60  * Indicate at which offset (relative to the CFA) a caller saved register has
61  * been saved.
62  */
63 void be_dwarf_callframe_spilloffset(const arch_register_t *reg, int offset);
64
65 #endif