Skip to content

[lldb] Detect how the swift runtime stores currently executing task#13279

Draft
felipepiovezan wants to merge 4 commits into
swiftlang:stable/21.xfrom
felipepiovezan:felipe/embedded_work
Draft

[lldb] Detect how the swift runtime stores currently executing task#13279
felipepiovezan wants to merge 4 commits into
swiftlang:stable/21.xfrom
felipepiovezan:felipe/embedded_work

Conversation

@felipepiovezan

@felipepiovezan felipepiovezan commented Jun 30, 2026

Copy link
Copy Markdown

The second commit fixes a typo in the symbol used to detect whether we have a statically linked concurrency library.

The third and fourth commit change LLDB so that it reads from the concurrency runtime library itself how task pointers are stored, building on top of the work in swiftlang/swift#90290. This is still just NFC: helper functions and data structures are created, but no functionality changes.

The fifth commit creates an abstraction that can be extended for each of the different ways the current task pointer can be stored. It is in practice NFC, as no new way is supported.

This is a draft, as I want to validate this hypothesis on embedded swift and also on Linux, which use different approaches than on non-embedded/macos targets

This also removes an incorrect use of `#ifdef
SWIFT_THREADING_USE_RESERVED_TLS_KEYS`. Such macro is meaningless for
the host.
@felipepiovezan felipepiovezan force-pushed the felipe/embedded_work branch from 522063c to 711a811 Compare July 6, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant