jasonmolenda added a comment.

Thanks Jonas, I think this change to Process can cover

  Omair's use case, where the number of bits are used hardcoded.
  
  The Darwin use case were ProcessGDBRemote, DynamicLoaderDarwinKernel, and 
ProcessMachCore can all set the number of bits used in addressing 
programmatically, detected at runtime.
  
  The firmware use case where people (often in a python script in a dSYM) can 
set the number of bits manually so it is correct in their environment, when the 
dynamic detection schemes are not available.

Justin's case where ptrace(PTRACE_GETREGSET) gets us a code and data address 
mask.

Canonicalizing them as masks in Process, accepting either form, and providing 
the value as a mask, should make it easy to use in the ABI plugins where we 
have a FixCodeAddress and FixDataAddress.

On Darwin, we use the same number of bits for both code and data, but given the 
way ptrace() behaves on Linux, I'm guessing this may not be the case 
everywhere.  Should we store both masks, and add FixCodeAddress + 
FixDataAddress methods in the ABI's, Justin?  What do you think?

The Darwin support can be adapted to this centralized scheme that Jonas has 
written easily.  Everyone else OK with this?

I don't feel strongly about the method name.  Justin used 
Process::GetPointerAuthenticationAddressMask which makes it sound specific to 
ARM v8.3 ptrauth.  The ARM v8.5 MTE tagging might be another use case (or TBI 
as Omair has noted).


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

https://reviews.llvm.org/D100515

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

Reply via email to