[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 24 05:50:58 PST 2025
================
@@ -87,6 +150,18 @@ bool ABISysV_arm64::PrepareTrivialCall(Thread &thread, addr_t sp,
if (args.size() > 8)
return false;
+ // Do this first, as it's got the most chance of failing (though still very
+ // low).
+ if (GetProcessSP()->GetTarget().GetArchitecture().GetTriple().isOSLinux()) {
+ Status err = PushToLinuxGuardedControlStack(return_addr, reg_ctx, thread);
+ // If we could not manage the GCS, the expression will certainly fail,
+ // and if we just carried on, that failure would be a lot more cryptic.
+ if (err.Fail()) {
+ LLDB_LOGF(log, "Failed to setup Guarded Call Stack: %s", err.AsCString());
+ return false;
+ }
+ }
----------------
DavidSpickett wrote:
Moved this up, before we write any other registers, as a temporary workaround.
https://github.com/llvm/llvm-project/pull/123918
More information about the lldb-commits
mailing list