All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <andrew.jones@linux.dev>
To: kvmarm@lists.linux.dev
Cc: alexandru.elisei@arm.com, eric.auger@redhat.com
Subject: [kvm-unit-tests PATCH] arm64: Improve unhandled exception traces
Date: Tue, 27 Feb 2024 20:09:36 +0100	[thread overview]
Message-ID: <20240227190935.486566-2-andrew.jones@linux.dev> (raw)

Put the stack trace at the bottom, rather than mixing it with
register dumps, and also start the trace from the current PC.

Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
 lib/arm64/processor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/arm64/processor.c b/lib/arm64/processor.c
index 5bcad679605e..06fd7cfcc548 100644
--- a/lib/arm64/processor.c
+++ b/lib/arm64/processor.c
@@ -130,9 +130,9 @@ static void bad_exception(enum vector v, struct pt_regs *regs,
 	printf("Vector: %d (%s)\n", v, vector_names[v]);
 	printf("ESR_EL1: %8s%08x, ec=%#x (%s)\n", "", esr, ec, ec_names[ec]);
 	printf("FAR_EL1: %016lx (%svalid)\n", far, far_valid ? "" : "not ");
-	dump_stack();
 	printf("Exception frame registers:\n");
 	show_regs(regs);
+	dump_frame_stack((void *)regs->pc, (void *)regs->regs[29]);
 	abort();
 }
 
-- 
2.43.0


             reply	other threads:[~2024-02-27 19:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 19:09 Andrew Jones [this message]
2024-03-18 16:47 ` [kvm-unit-tests PATCH] arm64: Improve unhandled exception traces Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240227190935.486566-2-andrew.jones@linux.dev \
    --to=andrew.jones@linux.dev \
    --cc=alexandru.elisei@arm.com \
    --cc=eric.auger@redhat.com \
    --cc=kvmarm@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.