rust-lang / rust-lang/rust

debuginfo test suite needs more documentation

Open
#148,288 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-contributor-roadblock A-docs A-rustc-dev-guide A-testsuite C-bug T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

The docs for the debuginfo test suite are quite brief, consisting basically just of a single example. Even that example leasves me more confused than enlightened:

For example, the following will build the test, start the debugger, set a breakpoint, launch the program, inspect a value, and check what the debugger prints:

The #break comment is below the other comments in the file. So apparently something is going on here with the execution order of these comments that makes them not just top-to-bottom in the file?

Also, #break is not the only directive that can start with #. Apparently there's also #locN:
https://github.com/rust-lang/rust/blob/70320c1936e2cdf0dd4f79c6539b32dd928d4cc2/tests/debuginfo/macro-stepping.rs#L111
No idea what that does.

Also, keep in mind that whoever hits a test failure in a debuginfo test may have never used gdb or a tool like it. The documentation should either give them some chance to fix the test, or tell them whom to ping for help.

Contributor guide

Open the contributing guide

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 debuginfo tests section of the rustc-dev-guide and compare its example with tests/debuginfo/macro-stepping.rs, especially the #break and #locN directives. Document directive execution order, explain the referenced directives and debugger expectations, and include enough guidance for investigating failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, testing-qa
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.