backend: created a (not so nice) macro to iterate over all values defined by an instr...
[libfirm] / ir / be / bestabs.c
index a591884..f581bd0 100644 (file)
@@ -214,8 +214,14 @@ static void be_emit_tv_as_decimal(tarval *tv)
 
 static void emit_type_name(const ir_type *type)
 {
+       char *c;
        char buf[256];
        ir_print_type(buf, sizeof(buf), type);
+       /* replace special chars to be on the safe side */
+       for (c = buf; *c != '\0'; ++c) {
+               if (*c == '\n' || *c == '"' || *c == '\\')
+                       *c = '?';
+       }
        be_emit_string(buf);
 }
 
@@ -677,12 +683,14 @@ static void stabs_set_dbg_info(dbg_handle *h, dbg_info *dbgi)
 /**
  * dump the stabs for a method begin
  */
-static void stabs_method_begin(dbg_handle *handle, const ir_entity *ent, const be_stack_layout_t *layout)
+static void stabs_method_begin(dbg_handle *handle, const ir_entity *ent)
 {
        stabs_handle *h = (stabs_handle *)handle;
+       ir_graph     *irg = get_entity_irg(ent);
        ir_type      *mtp, *rtp;
        unsigned     type_num;
        int          i, n, between_size;
+       be_stack_layout_t *layout = be_get_irg_stack_layout(irg);
 
        h->cur_ent = ent;
        h->layout  = layout;