-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Add synthetic formatter for Swift.TaskGroup #10143
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
[lldb] Add synthetic formatter for Swift.TaskGroup #10143
Conversation
|
||
operator bool() const { return addr && addr != LLDB_INVALID_ADDRESS; } | ||
|
||
static constexpr offset_t JobFlagsOffset = 0x20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these offsets dependent on the target architecture or are they host offsets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check. I think so, but your question made me realize I have made some assumptions that I'll need to check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized I can get rid of some of these offsets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrian-prantl on review, I think these offsets will need to be adjusted for arm64_32.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to compute them as multiples of the pointer size of the target, and in addition verify that the Swift concurrency version (there's a new special symbol for this now) on the target is still 1 and error out otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this PR checks the swift concurrency version symbol.
I will merge this with 64 bit support and then setup a test for watchOS update for arm64_32 in a follow up.
@swift-ci test |
@swift-ci test |
) | ||
self.expect( | ||
"v group", | ||
substrs=[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this probably covers it, It would be slightly better to test GetChildWithName/GetChildAtIndex/GetNumChildren separately, since they are implemented separately, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a new test in 31845cf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I had a StringRef bug in GetIndexOfChildWithName
@swift-ci test |
Add synthetic data formatter for `TaskGroup`. This formatter prints the group's tasks using the previously added formatter for `Task`. (cherry-picked from commit 065c58e)
Add synthetic data formatter for `TaskGroup`. This formatter prints the group's tasks using the previously added formatter for `Task`. (cherry-picked from commit 065c58e)
Add synthetic data formatter for
TaskGroup
. This formatter prints the group's tasks using the previously added formatter forTask
.