summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/powerpc/aim/trap_subr.S2
-rw-r--r--sys/powerpc/powerpc/db_trace.c14
-rw-r--r--sys/powerpc/powerpc/trap_subr.S2
3 files changed, 13 insertions, 5 deletions
diff --git a/sys/powerpc/aim/trap_subr.S b/sys/powerpc/aim/trap_subr.S
index c719917..06ed891 100644
--- a/sys/powerpc/aim/trap_subr.S
+++ b/sys/powerpc/aim/trap_subr.S
@@ -438,6 +438,8 @@ CNAME(trapexit):
isync
addi %r3,%r1,8
bl CNAME(ast)
+ .globl CNAME(asttrapexit) /* backtrace code sentinel #2 */
+CNAME(asttrapexit):
b trapexit /* test ast ret value ? */
1:
FRAME_LEAVE(PC_TEMPSAVE)
diff --git a/sys/powerpc/powerpc/db_trace.c b/sys/powerpc/powerpc/db_trace.c
index 131beef..e70f5e1 100644
--- a/sys/powerpc/powerpc/db_trace.c
+++ b/sys/powerpc/powerpc/db_trace.c
@@ -97,6 +97,7 @@ struct db_variable db_regs[] = {
struct db_variable *db_eregs = db_regs + sizeof (db_regs)/sizeof (db_regs[0]);
extern int trapexit[];
+extern int asttrapexit[];
extern int end[];
/*
@@ -186,11 +187,13 @@ db_backtrace(struct thread *td, db_addr_t fp, int count)
db_printf("0x%08x: ", stackframe);
/*
- * The trap code labels the return address from the
- * call to C code as 'trapexit'. Use this to determine
- * if the callframe has to traverse a saved trap context
+ * The trap code labels the return addresses from the
+ * call to C code as 'trapexit' and 'asttrapexit. Use this
+ * to determine if the callframe has to traverse a saved
+ * trap context
*/
- if (lr + 4 == (db_addr_t) &trapexit) {
+ if ((lr + 4 == (db_addr_t) &trapexit) ||
+ (lr + 4 == (db_addr_t) &asttrapexit)) {
const char *trapstr;
struct trapframe *tf = (struct trapframe *)
(stackframe+8);
@@ -312,7 +315,8 @@ stack_save(struct stack *st)
* things are going wrong. Plus, prevents this shortened
* version of code from accessing user-space frames
*/
- if (callpc + 4 == (db_addr_t) &trapexit)
+ if (callpc + 4 == (db_addr_t) &trapexit ||
+ callpc + 4 == (db_addr_t) &asttrapexit)
break;
if (stack_put(st, callpc) == -1)
diff --git a/sys/powerpc/powerpc/trap_subr.S b/sys/powerpc/powerpc/trap_subr.S
index c719917..06ed891 100644
--- a/sys/powerpc/powerpc/trap_subr.S
+++ b/sys/powerpc/powerpc/trap_subr.S
@@ -438,6 +438,8 @@ CNAME(trapexit):
isync
addi %r3,%r1,8
bl CNAME(ast)
+ .globl CNAME(asttrapexit) /* backtrace code sentinel #2 */
+CNAME(asttrapexit):
b trapexit /* test ast ret value ? */
1:
FRAME_LEAVE(PC_TEMPSAVE)
OpenPOWER on IntegriCloud