diff options
author | Med Ismail Bennani <ismail@bennani.ma> | 2024-06-10 10:49:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 10:49:16 -0700 |
commit | 93b91ddddd031a703cc2f19bbe35e95bc0de6970 (patch) | |
tree | de215ce4376a92dec7f9d00c68487532adb32609 | |
parent | 61df854d4c4d5f955693394d57f09b9fcd35be67 (diff) | |
download | llvm-93b91ddddd031a703cc2f19bbe35e95bc0de6970.zip llvm-93b91ddddd031a703cc2f19bbe35e95bc0de6970.tar.gz llvm-93b91ddddd031a703cc2f19bbe35e95bc0de6970.tar.bz2 |
[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@bennani.ma>
-rw-r--r-- | lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp index 7550432..25cee36 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(); |