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