Skip to content

Commit 4f083f6

Browse files
[lldb][swift] Call FixDataAddress on task pointers before printing them
These are pointers to heap addresses that may sometimes be tagged.
1 parent 1e325b7 commit 4f083f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/source/Plugins/Language/Swift/SwiftFormatters.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,8 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
859859
m_ts->GetTypeFromMangledTypename(ConstString("$sSVD"));
860860

861861
addr_t value = m_task_ptr;
862+
if (auto process_sp = m_backend.GetProcessSP())
863+
value = process_sp->FixDataAddress(value);
862864
DataExtractor data{reinterpret_cast<const void *>(&value),
863865
sizeof(value), endian::InlHostByteOrder(),
864866
sizeof(void *)};
@@ -899,7 +901,7 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
899901
parent_addr = 0;
900902
}
901903

902-
addr_t value = parent_addr;
904+
addr_t value = process_sp->FixDataAddress(parent_addr);
903905
DataExtractor data{reinterpret_cast<const void *>(&value),
904906
sizeof(value), endian::InlHostByteOrder(),
905907
sizeof(void *)};

0 commit comments

Comments
 (0)