- fixed stabs output
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 25 Jun 2008 01:28:53 +0000 (01:28 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 25 Jun 2008 01:28:53 +0000 (01:28 +0000)
[r20249]

ir/be/arm/arm_emitter.c
ir/be/arm/bearch_arm.c

index 6ce78d3..0744f59 100644 (file)
@@ -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;
index 045ac81..06deada 100644 (file)
@@ -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)