summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-07-22 21:15:43 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-07-22 21:15:43 +0000
commit27e86a37f7aa4330944f156b5d8c531ce1b9afb1 (patch)
tree3fb4756b8fc625408b4a3ca5cd0740f7e62884a0 /sys/arch
parent507033cedbc4148bb3b909524dfb32de4c3193b4 (diff)
When disassembling, if our pc matches the beginning of a routine, then
it's at routine+0; do not search for the previous routine in the symbol table. This fixes tracebacks when the fault occurs on the first instruction of a routine.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/db_machdep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c
index f84585025a0..9ba66a49770 100644
--- a/sys/arch/mips64/mips64/db_machdep.c
+++ b/sys/arch/mips64/mips64/db_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.c,v 1.17 2008/06/22 21:02:10 miod Exp $ */
+/* $OpenBSD: db_machdep.c,v 1.18 2009/07/22 21:15:42 miod Exp $ */
/*
* Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
@@ -284,8 +284,6 @@ loop:
* Watch out for function tail optimizations.
*/
sym = db_search_symbol(pc, DB_STGY_ANY, &diff);
- if (sym != DB_SYM_NULL && diff == 0)
- sym = db_search_symbol(pc - 4, DB_STGY_ANY, &diff);
db_symbol_values(sym, &symname, 0);
if (sym != DB_SYM_NULL) {
subr = pc - diff;