From f2ceb891968886c2e1804b57070fe1376be6d646 Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Sun, 8 Dec 2013 12:40:29 +0100 Subject: Use db_addr_t instead of db_expr_t In this way everything falls into place and there is one cast less. Function db_task_printsym() is already always called with the cast to db_addr_t in the first argument. * ddb/db_aout.c (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t. (aout_db_search_by_addr): Don't cast to vm_offset_t. Argument is already db_addr_t. * ddb/db_aout.h (aout_db_line_at_pc): Use db_addr_t instead of db_expr_t. * ddb/db_sym.c (db_task_printsym): Likewise. (db_line_at_pc): Likewise. * ddb/db_sym.h (db_task_printsym): Likewise. (db_line_at_pc): Likewise. * i386/i386/db_trace.c (db_task_printsym): Cast to db_addr_t instead of db_expr_t. Member swap_func is a pointer to void. --- ddb/db_aout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ddb/db_aout.c') diff --git a/ddb/db_aout.c b/ddb/db_aout.c index fda7f09..8ef7efb 100644 --- a/ddb/db_aout.c +++ b/ddb/db_aout.c @@ -493,13 +493,13 @@ aout_db_line_at_pc(stab, sym, file, line, pc) db_sym_t sym; char **file; int *line; - db_expr_t pc; + db_addr_t pc; { char *func; unsigned long diff; boolean_t found; - found = aout_db_search_by_addr(stab, (vm_offset_t)pc, file, &func, line, &diff); + found = aout_db_search_by_addr(stab, pc, file, &func, line, &diff); return(found && func && *file); } -- cgit v1.2.3