X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbestabs.c;h=a51fdfde7f9f25421ef917e2cb3657bed77bdbfe;hb=22b354ac921664032c93e5f0176fa668c95dfc60;hp=6872902c2342f50c494232bc31541d5b368312e8;hpb=9d564d6198d8a1e36a3a9c9ec9ca4d13c6acd153;p=libfirm diff --git a/ir/be/bestabs.c b/ir/be/bestabs.c index 6872902c2..a51fdfde7 100644 --- a/ir/be/bestabs.c +++ b/ir/be/bestabs.c @@ -661,7 +661,8 @@ 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, ir_entity *ent, const be_stack_layout_t *layout) { +static void stabs_method_begin(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout) +{ stabs_handle *h = (stabs_handle *)handle; ir_type *mtp, *rtp; unsigned type_num; @@ -681,7 +682,7 @@ static void stabs_method_begin(dbg_handle *handle, ir_entity *ent, const be_stac type_num = get_type_number(h, rtp); be_emit_irprintf("\t.stabs\t\"%s:%c%u\",%u,0,0,%s\n", get_entity_name(ent), - get_entity_visibility(ent) == visibility_external_visible ? 'F' : 'f', + get_entity_visibility(ent) == ir_visibility_local ? 'f' : 'F', type_num, N_FUN, get_entity_ld_name(ent)); @@ -793,20 +794,19 @@ static void stabs_variable(dbg_handle *handle, ir_entity *ent) { unsigned tp_num = get_type_number(h, get_entity_type(ent)); char buf[1024]; - if (get_entity_visibility(ent) == visibility_external_visible) { - /* a global variable */ - snprintf(buf, sizeof(buf), "\t.stabs\t\"%s:G%u\",%d,0,0,0\n", - get_entity_name(ent), tp_num, N_GSYM); - } else { /* some kind of local */ - ir_variability variability = get_entity_variability(ent); + if (get_entity_visibility(ent) == ir_visibility_local) { + /* some kind of local */ + ir_linkage linkage = get_entity_linkage(ent); int kind = N_STSYM; - if (variability == variability_uninitialized) - kind = N_LCSYM; - else if (variability == variability_constant) + if (linkage & IR_LINKAGE_CONSTANT) kind = N_ROSYM; snprintf(buf, sizeof(buf), "\t.stabs\t\"%s:S%u\",%d,0,0,%s\n", get_entity_name(ent), tp_num, kind, get_entity_ld_name(ent)); + } else { + /* a global variable */ + snprintf(buf, sizeof(buf), "\t.stabs\t\"%s:G%u\",%d,0,0,0\n", + get_entity_name(ent), tp_num, N_GSYM); } buf[sizeof(buf) - 1] = '\0';