Commit a97bec90 authored by Matthias Braun's avatar Matthias Braun
Browse files

bedwarf: rename method->function

parent 07e911f5
...@@ -74,7 +74,7 @@ typedef enum custom_abbrevs { ...@@ -74,7 +74,7 @@ typedef enum custom_abbrevs {
* The dwarf handle. * The dwarf handle.
*/ */
typedef struct dwarf_t { typedef struct dwarf_t {
const ir_entity *cur_ent; /**< current method entity */ const ir_entity *cur_ent; /**< current function entity */
unsigned next_type_nr; /**< next type number */ unsigned next_type_nr; /**< next type number */
pmap *file_map; /**< a map from file names to number in pmap *file_map; /**< a map from file names to number in
file list */ file list */
...@@ -453,8 +453,8 @@ static void emit_function_parameters(const ir_entity *entity, ...@@ -453,8 +453,8 @@ static void emit_function_parameters(const ir_entity *entity,
} }
} }
void be_dwarf_method_before(const ir_entity *entity, void be_dwarf_function_before(const ir_entity *entity,
const parameter_dbg_info_t *parameter_infos) const parameter_dbg_info_t *parameter_infos)
{ {
if (debug_level < LEVEL_BASIC) if (debug_level < LEVEL_BASIC)
return; return;
...@@ -483,7 +483,7 @@ void be_dwarf_method_before(const ir_entity *entity, ...@@ -483,7 +483,7 @@ void be_dwarf_method_before(const ir_entity *entity,
} }
emit_int8(is_extern_entity(entity)); emit_int8(is_extern_entity(entity));
emit_ref(entity); emit_ref(entity);
be_emit_irprintf("\t.long %smethod_end_%s\n", be_gas_get_private_prefix(), be_emit_irprintf("\t.long %sfunction_end_%s\n", be_gas_get_private_prefix(),
get_entity_ld_name(entity)); get_entity_ld_name(entity));
/* frame_base prog */ /* frame_base prog */
emit_int8(1); emit_int8(1);
...@@ -497,7 +497,7 @@ void be_dwarf_method_before(const ir_entity *entity, ...@@ -497,7 +497,7 @@ void be_dwarf_method_before(const ir_entity *entity,
env.cur_ent = entity; env.cur_ent = entity;
} }
void be_dwarf_method_begin(void) void be_dwarf_function_begin(void)
{ {
if (debug_level < LEVEL_FRAMEINFO) if (debug_level < LEVEL_FRAMEINFO)
return; return;
...@@ -505,12 +505,12 @@ void be_dwarf_method_begin(void) ...@@ -505,12 +505,12 @@ void be_dwarf_method_begin(void)
be_emit_write_line(); be_emit_write_line();
} }
void be_dwarf_method_end(void) void be_dwarf_function_end(void)
{ {
if (debug_level < LEVEL_BASIC) if (debug_level < LEVEL_BASIC)
return; return;
const ir_entity *entity = env.cur_ent; const ir_entity *entity = env.cur_ent;
be_emit_irprintf("%smethod_end_%s:\n", be_gas_get_private_prefix(), be_emit_irprintf("%sfunction_end_%s:\n", be_gas_get_private_prefix(),
get_entity_ld_name(entity)); get_entity_ld_name(entity));
if (debug_level >= LEVEL_FRAMEINFO) { if (debug_level >= LEVEL_FRAMEINFO) {
......
...@@ -30,15 +30,15 @@ void be_dwarf_unit_begin(const char *filename); ...@@ -30,15 +30,15 @@ void be_dwarf_unit_begin(const char *filename);
/** end compilation unit */ /** end compilation unit */
void be_dwarf_unit_end(void); void be_dwarf_unit_end(void);
/** output debug info necessary right before defining a method */ /** output debug info necessary right before defining a function */
void be_dwarf_method_before(const ir_entity *ent, void be_dwarf_function_before(const ir_entity *ent,
const parameter_dbg_info_t *infos); const parameter_dbg_info_t *infos);
/** output debug info right before beginning to output assembly instructions */ /** output debug info right before beginning to output assembly instructions */
void be_dwarf_method_begin(void); void be_dwarf_function_begin(void);
/** debug for a method end */ /** debug for a function end */
void be_dwarf_method_end(void); void be_dwarf_function_end(void);
/** dump a variable in the global type */ /** dump a variable in the global type */
void be_dwarf_variable(const ir_entity *ent); void be_dwarf_variable(const ir_entity *ent);
......
...@@ -522,7 +522,7 @@ static void emit_visibility(const ir_entity *entity, bool implicit_globl) ...@@ -522,7 +522,7 @@ static void emit_visibility(const ir_entity *entity, bool implicit_globl)
void be_gas_emit_function_prolog(const ir_entity *entity, unsigned po2alignment, void be_gas_emit_function_prolog(const ir_entity *entity, unsigned po2alignment,
const parameter_dbg_info_t *parameter_infos) const parameter_dbg_info_t *parameter_infos)
{ {
be_dwarf_method_before(entity, parameter_infos); be_dwarf_function_before(entity, parameter_infos);
be_gas_section_t section = determine_section(NULL, entity); be_gas_section_t section = determine_section(NULL, entity);
emit_section(section, entity); emit_section(section, entity);
...@@ -577,12 +577,12 @@ void be_gas_emit_function_prolog(const ir_entity *entity, unsigned po2alignment, ...@@ -577,12 +577,12 @@ void be_gas_emit_function_prolog(const ir_entity *entity, unsigned po2alignment,
be_emit_cstring(":\n"); be_emit_cstring(":\n");
be_emit_write_line(); be_emit_write_line();
be_dwarf_method_begin(); be_dwarf_function_begin();
} }
void be_gas_emit_function_epilog(const ir_entity *entity) void be_gas_emit_function_epilog(const ir_entity *entity)
{ {
be_dwarf_method_end(); be_dwarf_function_end();
if (be_gas_object_file_format == OBJECT_FILE_FORMAT_ELF) { if (be_gas_object_file_format == OBJECT_FILE_FORMAT_ELF) {
be_emit_cstring("\t.size\t"); be_emit_cstring("\t.size\t");
...@@ -1309,7 +1309,7 @@ static void emit_global(be_main_env_t const *const main_env, ...@@ -1309,7 +1309,7 @@ static void emit_global(be_main_env_t const *const main_env,
if (kind == IR_ENTITY_LABEL) if (kind == IR_ENTITY_LABEL)
return; return;
/* we already emitted all methods with graphs in other functions like /* we already emitted all functions with graphs in other functions like
* be_gas_emit_function_prolog(). All others don't need to be emitted. */ * be_gas_emit_function_prolog(). All others don't need to be emitted. */
be_gas_section_t const section = determine_section(main_env, entity); be_gas_section_t const section = determine_section(main_env, entity);
if (kind == IR_ENTITY_METHOD && section != GAS_SECTION_PIC_TRAMPOLINES) if (kind == IR_ENTITY_METHOD && section != GAS_SECTION_PIC_TRAMPOLINES)
......
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