Skip to content

[lldb][swift] Call FixDataAddress on task pointers before printing them #11061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: stable/20240723
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lldb/source/Plugins/Language/Swift/SwiftFormatters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
m_ts->GetTypeFromMangledTypename(ConstString("$sSVD"));

addr_t value = m_task_ptr;
if (auto process_sp = m_backend.GetProcessSP())
value = process_sp->FixDataAddress(value);
DataExtractor data{reinterpret_cast<const void *>(&value),
sizeof(value), endian::InlHostByteOrder(),
sizeof(void *)};
Expand Down Expand Up @@ -899,7 +901,7 @@ class TaskSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
parent_addr = 0;
}

addr_t value = parent_addr;
addr_t value = process_sp->FixDataAddress(parent_addr);
DataExtractor data{reinterpret_cast<const void *>(&value),
sizeof(value), endian::InlHostByteOrder(),
sizeof(void *)};
Expand Down