From 371f15ddc89adae025f1e9275968a2a6d29becc7 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 25 Jun 2008 01:28:53 +0000 Subject: [PATCH] - fixed stabs output [r20249] --- ir/be/arm/arm_emitter.c | 11 ++++++++--- ir/be/arm/bearch_arm.c | 7 ++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ir/be/arm/arm_emitter.c b/ir/be/arm/arm_emitter.c index 6ce78d3c7..0744f59a1 100644 --- a/ir/be/arm/arm_emitter.c +++ b/ir/be/arm/arm_emitter.c @@ -1200,9 +1200,10 @@ static int cmp_sym_or_tv(const void *elt, const void *key, size_t size) { * Main driver. Emits the code for one routine. */ void arm_gen_routine(const arm_code_gen_t *arm_cg, ir_graph *irg) { - ir_node **blk_sched; - int i, n; - ir_node *last_block = NULL; + ir_node **blk_sched; + int i, n; + ir_node *last_block = NULL; + ir_entity *entity = get_irg_entity(irg); cg = arm_cg; isa = (const arm_isa_t *)cg->arch_env; @@ -1211,6 +1212,8 @@ void arm_gen_routine(const arm_code_gen_t *arm_cg, ir_graph *irg) { arm_register_emitters(); + be_dbg_method_begin(entity, be_abi_get_stack_layout(cg->birg->abi)); + /* create the block schedule. For now, we don't need it earlier. */ blk_sched = be_create_block_schedule(cg->irg, cg->birg->exec_freq); @@ -1231,6 +1234,8 @@ void arm_gen_routine(const arm_code_gen_t *arm_cg, ir_graph *irg) { last_block = block; } + be_dbg_method_end(); + /* emit SymConst values */ if (set_count(sym_or_tv) > 0) { sym_or_tv_t *entry; diff --git a/ir/be/arm/bearch_arm.c b/ir/be/arm/bearch_arm.c index 045ac816e..06deada20 100644 --- a/ir/be/arm/bearch_arm.c +++ b/ir/be/arm/bearch_arm.c @@ -766,7 +766,7 @@ static arch_env_t *arm_init(FILE *file_handle) { static int inited = 0; arm_isa_t *isa; - if(inited) + if (inited) return NULL; isa = xmalloc(sizeof(*isa)); @@ -780,6 +780,11 @@ static arch_env_t *arm_init(FILE *file_handle) { arm_create_opcodes(&arm_irn_ops); arm_handle_intrinsics(); + /* needed for the debug support */ + be_gas_emit_switch_section(GAS_SECTION_TEXT); + be_emit_cstring(".Ltext0:\n"); + be_emit_write_line(); + /* we mark referenced global entities, so we can only emit those which * are actually referenced. (Note: you mustn't use the type visited flag * elsewhere in the backend) -- 2.20.1