[Lldb-commits] [lldb] 93b91dd - [lldb] Tighten ABI assert in `StopInfoMachException::DeterminePtrauthFailure` (NFC) (#95015)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 10 10:49:20 PDT 2024
Author: Med Ismail Bennani
Date: 2024-06-10T10:49:16-07:00
New Revision: 93b91ddddd031a703cc2f19bbe35e95bc0de6970
URL: https://github.com/llvm/llvm-project/commit/93b91ddddd031a703cc2f19bbe35e95bc0de6970
DIFF: https://github.com/llvm/llvm-project/commit/93b91ddddd031a703cc2f19bbe35e95bc0de6970.diff
LOG: [lldb] Tighten ABI assert in `StopInfoMachException::DeterminePtrauthFailure` (NFC) (#95015)
This patch tightens the assert check for the ABISP object in
`StopInfoMachException::DeterminePtrauthFailure`.
This causes some failure when debugging on a system that doesn't have
pointer authentification support, like on Intel for instance.
rdar://129401926
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Added:
Modified:
lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 75504323b4fdf..25cee369d7ee3 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -92,9 +92,7 @@ bool StopInfoMachException::DeterminePtrauthFailure(ExecutionContext &exe_ctx) {
Target &target = *exe_ctx.GetTargetPtr();
Process &process = *exe_ctx.GetProcessPtr();
- ABISP abi_sp = process.GetABI();
const ArchSpec &arch = target.GetArchitecture();
- assert(abi_sp && "Missing ABI info");
// Check for a ptrauth-enabled target.
const bool ptrauth_enabled_target =
@@ -110,6 +108,9 @@ bool StopInfoMachException::DeterminePtrauthFailure(ExecutionContext &exe_ctx) {
strm.Printf("Note: Possible pointer authentication failure detected.\n");
};
+ ABISP abi_sp = process.GetABI();
+ assert(abi_sp && "Missing ABI info");
+
// Check if we have a "brk 0xc47x" trap, where the value that failed to
// authenticate is in x16.
Address current_address = current_frame->GetFrameCodeAddress();
More information about the lldb-commits
mailing list