clayborg added a comment.
In D155905#4536917 <https://reviews.llvm.org/D155905#4536917>, @jasonmolenda
wrote:
> Also interesting to consider if there should be an "Any" define. e.g.
>
> enum AddressMaskType {
> eTypeCode = 0,
> eTypeData,
> eTypeHighmemCode,
> eTypeHighmemData,
> eTypeAny
> };
> lldb::addr_t GetAddressMask(AddressMaskType mask_type);
> void SetAddressMask(AddressMaskType mask_type, lldb::addr_t mask);
>
> The patch also adds SBProcess::FixCodeAddress, SBProcess::FixDataAddress, and
> SBProcess::FixAddress -- FixAddress is always calling FixDataAddress right
> now, because Data can be at any address on all the targets we support today,
> whereas CodeAddress may have low bits masked off (e.g. armv7 where the low
> bit is sometimes used to indicate arm/thub, but it could be for AArch64 as
> well). So `GetAddressMask(eTypeAny)` would probably return the data mask,
> and `SetAddressMask(eTypeAny, mask)` would set all the address masks to the
> same value.
I like it the above approach with more enums for the high and low code/data.
Not sure if eTypeAny makes sense in the GetAddressMask(eTypeAny) scenario, but
I can see the use for a eTypeAll in case you wanted to set all of the various
address masks to zero though using SetAddressMask(eTypeAll, mask). We would
need to document this in the enum header file if we do add a eTypeAny or
eTypeAll.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155905/new/
https://reviews.llvm.org/D155905
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits