Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Mar 2022 11:59:41 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e793a55a74eb - main - Print the instruction for the unknown exception
Message-ID:  <202203081159.228BxfuS004175@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=e793a55a74eb34ae3225d620a9619554667efb30

commit e793a55a74eb34ae3225d620a9619554667efb30
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-03-08 11:02:02 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-03-08 11:54:58 +0000

    Print the instruction for the unknown exception
    
    The arm64 unknown exception will be raised when we execute an
    instruction that id invalid or disabled. To help debug these print
    the instruction that failed.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm64/arm64/trap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
index 93167f4d2347..fa921e39b844 100644
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -492,6 +492,8 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
 	case EXCP_UNKNOWN:
 		if (undef_insn(1, frame))
 			break;
+		printf("Undefined instruction: %08x\n",
+		    *(uint32_t *)frame->tf_elr);
 		/* FALLTHROUGH */
 	default:
 		print_registers(frame);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203081159.228BxfuS004175>