/**
* 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;
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));
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';