================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to