From 910faff26707e8176272f14977ef830d6c680970 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 13 Sep 2006 13:40:51 +0000 Subject: [PATCH] add option to switch stabs support on/off --- ir/be/be_t.h | 22 ++++++++++++---------- ir/be/bemain.c | 4 +++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ir/be/be_t.h b/ir/be/be_t.h index b5b07a9e6..930239e61 100644 --- a/ir/be/be_t.h +++ b/ir/be/be_t.h @@ -46,20 +46,22 @@ enum { BE_SCHED_SELECT_RANDOM = 5 }; +/** Backend options */ struct _be_options_t { - int dump_flags; - int timing; - int sched_select; - int opt_profile; - int mris; - int omit_fp; - int vrfy_option; - char ilp_server[128]; - char ilp_solver[128]; + int dump_flags; /**< backend dumping flags */ + int timing; /**< time the backend phases */ + int sched_select; /**< the current scheduler */ + int opt_profile; /**< instrument code for profiling */ + int mris; /**< enable mris preparation */ + int omit_fp; /**< try to omit the frame pointer */ + int stabs_debug_support; /**< enable stabs debugging support */ + int vrfy_option; /**< backend verify option */ + char ilp_server[128]; /**< the ilp server name */ + char ilp_solver[128]; /**< the ilp solver name */ }; struct _be_main_env_t { - struct obstack obst; + struct obstack obst; struct _be_node_factory_t *node_factory; struct _arch_env_t *arch_env; struct _be_options_t *options; diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 09441d042..1500fcffa 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -75,6 +75,7 @@ static be_options_t be_options = { 0, /* no opt profile */ 0, /* disable mris */ 1, /* try to omit frame pointer */ + 0, /* no stabs debugging output */ BE_VRFY_WARN, /* verification level: warn */ "i44pc52.info.uni-karlsruhe.de", /* ilp server */ "cplex" /* ilp solver */ @@ -170,6 +171,7 @@ static const lc_opt_table_entry_t be_main_options[] = { LC_OPT_ENT_ENUM_PTR ("ra", "register allocator", &ra_var), LC_OPT_ENT_ENUM_PTR ("isa", "the instruction set architecture", &isa_var), LC_OPT_ENT_NEGBOOL ("noomitfp", "do not omit frame pointer", &be_options.omit_fp), + LC_OPT_ENT_BOOL ("stabs", "enable stabs debug support", &be_options.stabs_debug_support), LC_OPT_ENT_ENUM_PTR ("vrfy", "verify the backend irg (off, warn, assert)", &vrfy_var), LC_OPT_ENT_BOOL ("time", "get backend timing statistics", &be_options.timing), LC_OPT_ENT_BOOL ("profile", "instrument the code for execution count profiling", &be_options.opt_profile), @@ -290,7 +292,7 @@ static be_main_env_t *be_init_env(be_main_env_t *env, FILE *file_handle) env->phi_handler = be_phi_handler_new(env->arch_env); arch_env_push_irn_handler(env->arch_env, env->phi_handler); - env->db_handle = be_stabs_open(file_handle); + env->db_handle = be_options.stabs_debug_support ? be_stabs_open(file_handle) : be_nulldbg_open(); return env; } -- 2.20.1