Skip to content

Instantly share code, notes, and snippets.

@retpolanne
Last active October 16, 2023 11:36
Show Gist options
  • Save retpolanne/8eab7d0dbcd7f4f7fa6f21adf7759674 to your computer and use it in GitHub Desktop.
Save retpolanne/8eab7d0dbcd7f4f7fa6f21adf7759674 to your computer and use it in GitHub Desktop.
GDB using Docker and Colima

GDB using Docker and Colima

You need to create a privileged container, with SYS_PTRACE capabilities and host PID, so you can access all the PIDs in the host (in my case, Colima VM).

docker run --privileged --cap-add=SYS_PTRACE --pid=host --name gdb-docker -it ubuntu:latest bash

Within the container:

apt update && apt install -y gdb

Then for gdb-heap

apt-get install -y libc6-dev libc6-dbg python3-gi libglib2.0-dev python3-ply python3-dbg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment