diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-01-13 22:55:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-01-13 22:55:55 +0000 |
commit | 74d43aa089d22f4280837684804f42508a85c0d6 (patch) | |
tree | 32635742eeed45ac9222cd8ec8598490e8c3459e /sys | |
parent | be71ccec7ce4ac608ecd68ec29c15219280d8d28 (diff) |
Do not lose ra on the first loop (regression from 1.20)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/db_machdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c index 010f2e7efd5..e42acc35a5b 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.23 2010/01/09 23:34:29 miod Exp $ */ +/* $OpenBSD: db_machdep.c,v 1.24 2010/01/13 22:55:54 miod Exp $ */ /* * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) @@ -248,22 +248,25 @@ db_stack_trace_print(addr, have_addr, count, modif, pr) /* Jump here when done with a frame, to start a new one */ loop: symname = NULL; - ra = 0; subr = 0; stksize = 0; - if (count-- == 0) + if (count-- == 0) { + ra = 0; goto end; + } /* check for bad SP: could foul up next frame */ if (sp & 3 || !VALID_ADDRESS(sp)) { (*pr)("SP %p: not in kernel\n", sp); + ra = 0; goto done; } /* check for bad PC */ if (pc & 3 || !VALID_ADDRESS(pc)) { (*pr)("PC %p: not in kernel\n", pc); + ra = 0; goto done; } |