[Lldb-commits] [lldb] [lldb] Restore register state if PrepareTrivialCall fails (PR #129038)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 28 07:56:12 PST 2025
================
@@ -102,12 +102,7 @@ static Status PushToLinuxGuardedControlStack(addr_t return_addr,
size_t wrote = thread.GetProcess()->WriteMemory(gcspr_el0, &return_addr,
sizeof(return_addr), error);
if ((wrote != sizeof(return_addr) || error.Fail())) {
- // When PrepareTrivialCall fails, the register context is not restored,
- // unlike when an expression fails to execute. This is arguably a bug,
- // see https://github.com/llvm/llvm-project/issues/124269.
- // For now we are handling this here specifically. We can assume this
- // write will work as the one to decrement the register did.
- reg_ctx->WriteRegisterFromUnsigned(gcspr_el0_info, gcspr_el0 + 8);
+ // gcspr_el0 will be restored when the ThreadPlan is destroyed.
----------------
DavidSpickett wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/129038
More information about the lldb-commits
mailing list