diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-08-01 09:41:26 -0700 |
---|---|---|
committer | Ian Lewis <ianlewis@google.com> | 2019-08-02 10:10:48 +0900 |
commit | e06142e033b3d15a5eaeae0e05f0dfd59c090a48 (patch) | |
tree | 7d72805416578f652e94a0f33fa18f6867c70570 /content/docs | |
parent | 6ee109aca465e88b6e00a7b36b865649afb4e809 (diff) |
Update debugging.md
Diffstat (limited to 'content/docs')
-rw-r--r-- | content/docs/user_guide/debugging.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/docs/user_guide/debugging.md b/content/docs/user_guide/debugging.md index d8fb97184..e6f024de6 100644 --- a/content/docs/user_guide/debugging.md +++ b/content/docs/user_guide/debugging.md @@ -59,10 +59,13 @@ sudo runsc --root /var/run/docker/runtime-runsc/moby debug --stacks 63254c6ab3a6 ## Debugger You can debug gVisor like any other Golang program. If you're running with Docker, -you'll need to find the sandbox PID and attach the debugger as root. Other than -that, it's business as usual. +you'll need to find the sandbox PID and attach the debugger as root. Here is an +example: ```bash +# Get a runsc with debug symbols (download nightly or build with symbols). +bazel build -c dbg //runsc:runsc + # Start the container you want to debug. docker run --runtime=runsc --rm --name=test -d alpine sleep 1000 @@ -77,9 +80,6 @@ break mm.MemoryManager.MMap continue ``` -> Note: if the debugger cannot find symbols, rebuild runsc in debug mode: -> `bazel build -c dbg //runsc:runsc` - ## Profiling `runsc` integrates with Go profiling tools and gives you easy commands to profile |