From c54bcc5433138e139d56e42c3c7a295fedfea586 Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Wed, 19 Apr 2017 13:54:28 -0400 Subject: [PATCH] Fix for the ARM64 "bt" command. Without the patch, the backtrace of a non-panicking active task generates a segmentation violation when analyzing Android 4.4-based dumpfiles. (zhizhouzhang@asrmicro.com) --- arm64.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arm64.c b/arm64.c index fbfb0e93..0ab83961 100644 --- a/arm64.c +++ b/arm64.c @@ -2232,6 +2232,10 @@ arm64_back_trace_cmd(struct bt_info *bt) stackframe.sp = bt->hp->esp + 8; bt->flags &= ~BT_REGS_NOT_FOUND; } else { + if (arm64_on_irq_stack(bt->tc->processor, bt->frameptr)) { + arm64_set_irq_stack(bt); + bt->flags |= BT_IRQSTACK; + } stackframe.sp = bt->stkptr; stackframe.pc = bt->instptr; stackframe.fp = bt->frameptr; @@ -2339,6 +2343,10 @@ arm64_back_trace_cmd_v2(struct bt_info *bt) stackframe.sp = bt->bptr + 16; bt->frameptr = stackframe.fp; } else { + if (arm64_on_irq_stack(bt->tc->processor, bt->frameptr)) { + arm64_set_irq_stack(bt); + bt->flags |= BT_IRQSTACK; + } stackframe.sp = bt->stkptr; stackframe.pc = bt->instptr; stackframe.fp = bt->frameptr;