jasonmolenda added inline comments.

================
Comment at: lldb/source/Target/RegisterContextUnwind.cpp:90
   // check if m_current_pc is valid
   if (unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
     // yes - current offset can be used as is
----------------
clayborg wrote:
> Don't we want to subtract 1 here? Otherwise this function might return true 
> incorrectly if we actually need to subtract at least 1 from the PC
honestly this method is a bit suspect, when we look at it today.  It's first 
"is $pc within ByteSize", then "ok is pc-1 within ByteSize", with a bonus check 
if somehow we have a negative offset.  Maybe it became suspect with revision 
over time.  I don't think it's wrong, but it's not written with much clarity 
and I should look into how it's changed over time to see if there was a cleaner 
vision of its goals originally...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124957/new/

https://reviews.llvm.org/D124957

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to