jasonmolenda added inline comments.

================
Comment at: lldb/source/Plugins/Process/mach-core/ThreadMachCore.cpp:112
+          auto exception_class =
+              static_cast<AppleArm64ExceptionClass>(esr_val >> 26);
+          if (exception_class !=
----------------
vsk wrote:
> jasonmolenda wrote:
> > shafik wrote:
> > > Does `26` have a meaning? I am guessing we are shifting to get the EC 
> > > bits?
> > Yeah I think the comment table in AppleArm64ExceptionClass.def would be 
> > better placed here, showing the bit positions of the three fields in the 
> > esr register probably.  AppleArm64ExceptionClass.def should make it clear 
> > that it is operating on the exception class field of the esr register, but 
> > the bit positions are more relevant here.
> Good point - actually, maybe it's cleaner to keep knowledge of the EC bit 
> position in the header. Lmk what you think.
I was thinking the same thing, that `getAppleArm64ExceptionClass` might just 
take the $esr register value and get the necessary bits from it.  I guess every 
caller of this is probably starting with the ESR register value, so having 
every caller know how to grab the EC value from ESR doesn't seem good.  Some 
callers might want to use EC/IL/ISS to describe the nature of the error so they 
may need to know where these bits are in the register, but if they just want 
the EC name, it's unnecessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109795

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

Reply via email to