Skip to content

[lldb] Introduce backtracing of Swift Tasks #9845

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

Merged

Conversation

kastiglione
Copy link

@kastiglione kastiglione commented Jan 16, 2025

Introduces the first of a new group of commands for working with Swift Task instances.

The new command group is language swift task, and the first command is backtrace. This backtrace command takes the name of a task variable and prints the task's backtrace. The variable can be either Task<Success, Failure> or UnsafeCurrentTask. The output is similar to the builtin thread backtrace (bt) command.

See the original PR: #9787

@kastiglione kastiglione requested a review from a team as a code owner January 16, 2025 19:08
@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione
Copy link
Author

@swift-ci test

CommandObjectLanguageSwiftTask(CommandInterpreter &interpreter)
: CommandObjectMultiword(
interpreter, "task", "Commands for inspecting Swift Tasks.",
"language swift task <subcommand> [<subcommand-options>]") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: Should we add an alias task = language swift task or (maybe less controversial) swift = language swift that is on by default?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: is swift-healthcheck an alias for language swift healthcheck?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add an alias task = language swift task or (maybe less controversial) swift = language swift that is on by default?

one of these two would be nice, I guess the question then is which one.

Related: is swift-healthcheck an alias for language swift healthcheck?

it's not currently, but we could switch it to that.

CommandObjectLanguageSwiftTask(CommandInterpreter &interpreter)
: CommandObjectMultiword(
interpreter, "task", "Commands for inspecting Swift Tasks.",
"language swift task <subcommand> [<subcommand-options>]") {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: is swift-healthcheck an alias for language swift healthcheck?

@kastiglione kastiglione merged commit 2c3335d into stable/20240723 Jan 17, 2025
3 checks passed
@kastiglione kastiglione deleted the dl/lldb-Introduce-backtracing-of-Swift-Tasks branch January 17, 2025 18:07
kastiglione added a commit that referenced this pull request Jan 22, 2025
Introduces the first of a new group of commands for working with Swift Task instances.

The new command group is `language swift task`, and the first command is `backtrace`. This `backtrace` command takes the name of a task variable and prints the task's backtrace. The variable can be either `Task<Success, Failure>` or `UnsafeCurrentTask`. The output is similar to the builtin `thread backtrace` (`bt`) command.

See the original PR: #9787
kastiglione added a commit that referenced this pull request Jan 22, 2025
Introduces the first of a new group of commands for working with Swift Task instances.

The new command group is `language swift task`, and the first command is `backtrace`. This `backtrace` command takes the name of a task variable and prints the task's backtrace. The variable can be either `Task<Success, Failure>` or `UnsafeCurrentTask`. The output is similar to the builtin `thread backtrace` (`bt`) command.

See the original PR: #9787

(cherry picked from commit 2c3335d)
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.

2 participants