Skip to content
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

Add documentation for running GDB and LLDB #4710

Merged
merged 7 commits into from
Dec 19, 2024

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Dec 18, 2024

After lots of fidgeting, LLDB seems to work. Not sure how reliable this will be though -- fission seems a little hit and miss.

@jonmeow jonmeow requested a review from chandlerc December 18, 2024 21:10
@github-actions github-actions bot added documentation An issue or proposed change to our documentation infrastructure labels Dec 18, 2024
@jonmeow jonmeow force-pushed the debug-info branch 4 times, most recently from 62a5d2d to 28acbea Compare December 18, 2024 22:15
@jonmeow
Copy link
Contributor Author

jonmeow commented Dec 18, 2024

After more digging, when building with --fission, it looks like intermediate dwo files aren't provided on rebuilds. That is to say, things like bazel-out/k8-dbg/bin/external/_main~llvm_project~llvm-project/llvm/_objs/Support/IntEqClasses.pic.dwo aren't produced, even though they're mentioned by the dwarf. So yeah, this looks like a bazel issue with --fission.

Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Niiice! Some tweaks inline, but LG with those.

Comment on lines 249 to 250
2. Symlink `lldb_launch.json` to `launch.json`:
`ln -s lldb_launch.json .vscode/launch.json`
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we make it a bit more explicit what this is doing? Thinking about something like this:

Suggested change
2. Symlink `lldb_launch.json` to `launch.json`:
`ln -s lldb_launch.json .vscode/launch.json`
2. Symlink `lldb_launch.json` to `launch.json` in the workspace directory (typically the checkout of the `carbon-lang` repository):
`ln -s lldb_launch.json .vscode/launch.json`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about instead writing "In the .vscode subdirectory"?

@@ -247,9 +286,10 @@ comfortable with it. The essential CMake options to pass in order for this to
work reliably include:

```
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld;lldbg
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld;lldbg
-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld;lldb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@jonmeow jonmeow enabled auto-merge December 19, 2024 00:30
@jonmeow jonmeow added this pull request to the merge queue Dec 19, 2024
Merged via the queue into carbon-language:trunk with commit ee4746c Dec 19, 2024
8 checks passed
@jonmeow jonmeow deleted the debug-info branch December 19, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An issue or proposed change to our documentation infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants