From f08d1e37cc4e72f93b1fe08b19012869f0370ecc Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 18 Jul 2008 21:57:32 +0000 Subject: 2008-07-18 Andrei Barbu * (ddb/db_sym.h): Add _DDB_DB_SYM_H_ header protection. (db_find_sym_and_offset, db_find_xtrn_sym_and_offset, db_find_task_sym_and_offset, db_find_xtrn_task_sym_and_offset): Call db_free_symbol. (db_free_symbol): New declaration. (db_sym_switch): New `free_symbol' member. (X_db_free_symbol): New macro. * ddb/db_sym.c (db_value_of_name, db_lookup, db_name_is_ambiguous, db_search_task_symbol, db_search_in_task_symbol, db_task_printsym): Call db_free_symbol. (db_free_symbol): New function. (dummy_db_free_symbol): New empty function. (x_db): Initialize `free_symbol' memberi with dummy_db_free_symbol. * i386/i386/db_trace.c (db_i386_stack_trace): Call db_free_symbol. * kern/lock_mon.c (print_lock_info): Likewise. --- i386/i386/db_trace.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'i386') diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c index aad305c..c4019b5 100644 --- a/i386/i386/db_trace.c +++ b/i386/i386/db_trace.c @@ -452,10 +452,14 @@ db_i386_stack_trace( if (INKERNEL((unsigned)callpc) && user_frame == 0) { db_addr_t call_func = 0; - db_symbol_values(0, db_search_task_symbol(callpc, - DB_STGY_XTRN, (db_addr_t *)&offset, - TASK_NULL), + db_sym_t sym_tmp; + db_symbol_values(0, + sym_tmp = db_search_task_symbol(callpc, + DB_STGY_XTRN, + (db_addr_t *)&offset, + TASK_NULL), &name, (db_expr_t *)&call_func); + db_free_symbol(sym_tmp); if ((db_user_trap_symbol_value && call_func == db_user_trap_symbol_value) || (db_kernel_trap_symbol_value && call_func == db_kernel_trap_symbol_value)) { frame_type = TRAP; -- cgit v1.2.3