Skip to content

Instantly share code, notes, and snippets.

@jlebon
Created July 28, 2020 14:51
Show Gist options
  • Save jlebon/ffd60c37da4575f8d71f91485ebd1bf7 to your computer and use it in GitHub Desktop.
Save jlebon/ffd60c37da4575f8d71f91485ebd1bf7 to your computer and use it in GitHub Desktop.
Using gdb from a container to debug rpm-ostree
Start the container using at least these switches:
(host) podman run -ti \
--privileged \
--pid=host \
-v /:/host \
--name gdb \
--detach-keys=ctrl-t \
registry.fedoraproject.org/fedora:32 /bin/bash
Attach to rpm-ostree:
(cnt) dnf install -y gdb procps-ng
(cnt) gdb -p $(pidof rpm-ostree) \
-ex 'set sysroot /host' \
-ex 'directory /host/var/roothome/sync' \
-ex 'directory /host/var/roothome/sync/libdnf/libdnf'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment