mapbox / mapbox/cpp

Docs on using lldb

Open
#7 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
110
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Upcoming mason provides packages for lldb 3.9.x that are identical on os x and linux: https://github.com/mapbox/mason/pull/253. This means we can and should write consistent docs for how to debug C++ programs on both platforms.

Topics to cover:
- How to build your program in debug mode
- How to use lldb to generate backtraces
- Via a core file:`lldb -c $(ls -t /cores/* | head -n1) --batch -o 'thread backtrace all' -o 'quit'`
- How to ensure core files are created and found on linux vs osx
- Via re-running the program with lld: `lldb --batch -o 'run' -k 'thread backtrace all' -k 'quit 1' node /path/to/script.js`
- How to use lldb to interactively debug
- How to use lldb from within XCode gui (refs #8)

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 by locating the C++ debugging documentation entry point in the repository and review the issue's LLDB commands. Cover debug builds, core-file discovery on Linux and macOS, batch backtraces, rerunning programs, interactive debugging, and the XCode GUI reference in #8. Done means both platforms have consistent, runnable guidance for each listed workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.