polarsignals / polarsignals/docs

Alternatives to generate debug information for c/cpp/rust

Open
#27 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I came across the symbolization support page for cpp and the steps documented to add debug information. There are a couple of options in clang and gcc which can be more effective.

  1. The -g (equivalent to -g2) flag generates a lot of debug information, most of which is unnecessary for symbolization. You can reduce the amount of debug information to only line tables by using -gmlt or -g1.

  2. The -gsplit-dwarf flag can generate debug information in a separate file. This helps reduce memory (and time) when linking large binaries with debug information in them. The debug information for each object file is placed in a .dwo file which can then be linked together to a single .dwp file. I believe this will save the objcopy steps.

Have you considered using these options?

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

Review the symbolization support page and the documented debug-information steps first. Compare the stated process with clang and gcc options such as -gmlt, -g1, and -gsplit-dwarf; the documentation is done when the alternatives and their effects on objcopy, .dwo, and .dwp files are clearly addressed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.