Date: Mon, 7 Feb 2022 11:58:47 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: 67dc576bae6e - main - Fix the signal code on 32-bit breakpoints on arm64 Message-ID: <202202071158.217BwlCL024292@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=67dc576bae6e624ae46962ad187e0e31fece6688 commit 67dc576bae6e624ae46962ad187e0e31fece6688 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-02-07 11:47:04 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-02-07 11:56:04 +0000 Fix the signal code on 32-bit breakpoints on arm64 When debugging 32-bit programs a debugger may insert a instruction that will raise the undefined instruction trap. The kernel handles these by raising a SIGTRAP, however the code was incorrect. Fix this by using the expected TRAP_BRKPT signal code. Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/undefined.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/undefined.c b/sys/arm64/arm64/undefined.c index 2cdb5f9a97fb..1feb242db060 100644 --- a/sys/arm64/arm64/undefined.c +++ b/sys/arm64/arm64/undefined.c @@ -105,7 +105,7 @@ gdb_trapper(vm_offset_t va, uint32_t insn, struct trapframe *frame, ksiginfo_init_trap(&ksi); ksi.ksi_signo = SIGTRAP; - ksi.ksi_code = TRAP_TRACE; + ksi.ksi_code = TRAP_BRKPT; ksi.ksi_addr = (void *)va; trapsignal(td, &ksi); return 1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202071158.217BwlCL024292>