[Lldb-commits] [lldb] Delegate to ABI plugin to check if call frame addresses are valid (PR #161398)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 1 13:18:21 PDT 2025
================
@@ -1870,10 +1880,8 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
if (ReadRegisterValueFromRegisterLocation(regloc, reg_info,
reg_value)) {
new_caller_pc_value = reg_value.GetAsUInt64();
- if (ProcessSP process_sp = m_thread.GetProcess()) {
- if (ABISP abi_sp = process_sp->GetABI())
- new_caller_pc_value = abi_sp->FixCodeAddress(new_caller_pc_value);
- }
+ if (abi_sp)
+ new_caller_pc_value = abi_sp->FixCodeAddress(new_caller_pc_value);
----------------
jasonmolenda wrote:
This is fine now that we've got an `abi_sp` local, but I'd prefer the API `process_sp->FixCodeAddress` here, that's a newer simplified method of calling. We had a lot of code doing (`if (process->GetABI()) abi->Fix...`) and added the method directly into Process to simplify that sequence. It makes zero difference here, except as an example of the more directly callable method.
https://github.com/llvm/llvm-project/pull/161398
More information about the lldb-commits
mailing list