File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
lldb/source/Plugins/LanguageRuntime/Swift Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,17 @@ namespace lldb_private {
14
14
bool LLDBMemoryReader::queryDataLayout (DataLayoutQueryType type, void *inBuffer,
15
15
void *outBuffer) {
16
16
switch (type) {
17
- // FIXME: add support for case DLQ_GetPtrAuthMask rdar://70729149
18
- case DLQ_GetPtrAuthMask:
19
- return false ;
17
+ case DLQ_GetPtrAuthMask: {
18
+ assert (m_process.GetCodeAddressMask () == m_process.GetDataAddressMask () &&
19
+ " not supported" );
20
+ lldb::addr_t ptrauth_mask = m_process.GetCodeAddressMask ();
21
+ if (!ptrauth_mask)
22
+ return false ;
23
+ // The mask returned by the process masks out the non-addressable bits.
24
+ uint64_t mask_pattern = ~ptrauth_mask;
25
+ memcpy (outBuffer, &mask_pattern, sizeof (uint64_t ));
26
+ return true ;
27
+ }
20
28
case DLQ_GetObjCReservedLowBits: {
21
29
auto *result = static_cast <uint8_t *>(outBuffer);
22
30
auto &triple = m_process.GetTarget ().GetArchitecture ().GetTriple ();
You can’t perform that action at this time.
0 commit comments