Commit 63e1d96c authored by Matthias Braun's avatar Matthias Braun
Browse files

bestabs: move stabs but not backend specific text0: code into stabs

parent 845f7e2b
......@@ -455,11 +455,6 @@ static arch_env_t *arm_init(FILE *file_handle)
be_gas_emit_types = false;
/* needed for the debug support */
be_gas_emit_switch_section(GAS_SECTION_TEXT);
be_emit_irprintf("%stext0:\n", be_gas_get_private_prefix());
be_emit_write_line();
return &isa->base;
}
......
......@@ -362,7 +362,6 @@ static be_main_env_t *be_init_env(be_main_env_t *env, FILE *file_handle)
memset(asm_constraint_flags, 0, sizeof(asm_constraint_flags));
env->arch_env = arch_env_init(isa_if, file_handle, env);
be_dbg_open();
return env;
}
......@@ -371,9 +370,6 @@ static be_main_env_t *be_init_env(be_main_env_t *env, FILE *file_handle)
*/
static void be_done_env(be_main_env_t *env)
{
arch_env_done(env->arch_env);
be_dbg_close();
pmap_destroy(env->ent_trampoline_map);
pmap_destroy(env->ent_pic_symbol_map);
free_type(env->pic_trampolines_type);
......@@ -511,6 +507,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
be_init_env(&env, file_handle);
env.cup_name = cup_name;
be_dbg_open();
be_dbg_unit_begin(cup_name);
be_dbg_types();
......@@ -801,7 +798,10 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
stat_ev_ctx_pop("bemain_irg");
}
arch_env_done(arch_env);
be_dbg_unit_end();
be_dbg_close();
ir_profile_free();
be_done_env(&env);
......
......@@ -628,6 +628,12 @@ static void gen_types(stabs_handle *h)
static void stabs_unit_begin(dbg_handle *handle, const char *filename)
{
stabs_handle *h = (stabs_handle *)handle;
/* needed for the debug support */
be_gas_emit_switch_section(GAS_SECTION_TEXT);
be_emit_irprintf("%stext0:\n", be_gas_get_private_prefix());
be_emit_write_line();
h->main_file = h->curr_file = filename;
be_emit_irprintf("\t.stabs\t\"%s\",%d,0,0,%stext0\n", filename, N_SO, be_gas_get_private_prefix());
be_emit_write_line();
......
......@@ -1554,11 +1554,6 @@ static arch_env_t *ia32_init(FILE *file_handle)
be_emit_cstring("\n#NO_APP\n");
}
/* needed for the debug support */
be_gas_emit_switch_section(GAS_SECTION_TEXT);
be_emit_irprintf("%stext0:\n", be_gas_get_private_prefix());
be_emit_write_line();
return &isa->base;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment