To recap, on AArch64 where we need to strip pointer authentication bits off of addresses, it can have a different number of bits in use for high and low memory (you can have a different page table setup for high and low memory, so different number of addressing bits for virtual addresses). I added this to Process and defined a new setting so these can be done manually in https://reviews.llvm.org/D151292 a few months ago.
This patch defines keys for qHostInfo and a new "addrable bits" LC_NOTE format for mach-o corefiles to define both of them.
qHostInfo gains low_mem_addressing_bits and high_mem_addressing_bits keys. The previous addressing_bits is still accepted for a value that is used for both regions of memory (this is by far the most common case).
For Mach-O corefile, I've needed to update the "addrable bits" LC_NOTE. The previous definition was
struct addressing_bit_count_v3 // ** DEPRECATED ** { uint32_t version; // currently 3 uint32_t addressing_bits; // # of bits used for addressing uint64_t unused; };
The new definition is
struct addressing_bit_count { // currently 4 uint32_t version; // Number of bits used for addressing in low // memory (addresses starting with 0) uint32_t low_memory_addressing_bits; // Number of bits used for addressing in high // memory (addresses starting with f) uint32_t high_memory_addressing_bits; // set to zero uint32_t reserved; };
The changes in this patchset are to GDBRemoteCommunicationClient (read the new qHostInfo keys), ProcessGDBRemote (set both in the Process when they are specified). And ObjectFileMachO (read and write the new LC_NOTE in mach-o corefiles), ProcessMachCore (set both in Process when they are specified).
I still accept the previous formats of a single value, and only initialize the base CodeAddressMask and DataAddressMask. Only when both high and low memory addressing bits are specified and are different, do we set the Process' HighmemCodeAddressMask, HighmemDataAddressMask.
This is the final part of adding support for the different address masks that can be used on AArch64 targets.
/param -> \param