rust-lang / rust-lang/rustc-dev-guide

Explain how to use gdb to debug the compiler

Open
#443 7 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-contribution-workflows A-contributor-devex A-debuggers C-enhancement E-help-wanted E-medium T-compiler T-libs
Dominant language
HTML
Stars
1.9k
Forks
613
Avg merge
17h 24m
Merged PRs (30d)
39

Description

There was a discussion in Zulip about how to attach gdb to x.py.

@petrochenkov suggested running gdb --args ./build/x86_64-pc-windows-gnu/stage1/bin/rustc src/test/ui/name.rs, I think it would be great to have this explained on rustc-guide because it's a recurring question.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rustc-guide and the linked Zulip discussion about attaching gdb to x.py. Use the x.py entry point, the example rustc command, and src/test/ui/name.rs to document the debugging workflow; done means a contributor can follow the guide to attach gdb and run the compiler test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.