Date: Mon, 18 Oct 2021 21:14:24 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Adrian Chadd <adrian@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 8398d52d6541 - main - arm: print out the undefined instruction upon an undefined instruction panic Message-ID: <AEA9E4D7-C8CD-4D5A-98CA-92E29CC2C310@freebsd.org> In-Reply-To: <202110181919.19IJJHws080182@gitrepo.freebsd.org> References: <202110181919.19IJJHws080182@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18 Oct 2021, at 20:19, Adrian Chadd <adrian@FreeBSD.org> wrote: >=20 > The branch main has been updated by adrian: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D8398d52d6541d316fcd88c856b5a72bb= 9cce0534 >=20 > commit 8398d52d6541d316fcd88c856b5a72bb9cce0534 > Author: Adrian Chadd <adrian@FreeBSD.org> > AuthorDate: 2021-10-16 03:15:15 +0000 > Commit: Adrian Chadd <adrian@FreeBSD.org> > CommitDate: 2021-10-18 19:18:52 +0000 >=20 > arm: print out the undefined instruction upon an undefined = instruction panic >=20 > It's SUPER useful to be able to see the actual undefined = instruction > when we hit said undefined instruction. > --- > sys/arm/arm/undefined.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c > index ef9e72c89163..4e9a5295d338 100644 > --- a/sys/arm/arm/undefined.c > +++ b/sys/arm/arm/undefined.c > @@ -341,7 +341,8 @@ undefinedinstruction(struct trapframe *frame) > return; > } > else > - panic("Undefined instruction in kernel.\n"); > + panic("Undefined instruction in kernel = (0x%08x).\n", > + fault_instruction); As I said in the review, printing this without the PSR_T bit in SPSR isn=E2=80=99t all that helpful, you can=E2=80=99t decode it without = knowing what SPSR is (though you may be able to guess by seeing whether one decoding is total junk and the other might plausibly trap). Jess
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AEA9E4D7-C8CD-4D5A-98CA-92E29CC2C310>