Skip to content

Instantly share code, notes, and snippets.

@surki
Last active August 27, 2020 12:57
Show Gist options
  • Save surki/eeaf0ce5cc07ef75fc1a886b6d5509f2 to your computer and use it in GitHub Desktop.
Save surki/eeaf0ce5cc07ef75fc1a886b6d5509f2 to your computer and use it in GitHub Desktop.
# Run this from the directory where amzlinux_rootfs is present
 
# Once: mount the appropriate procfs
for f in /proc /sys /dev; do sudo mount --bind $f ./amzlinux_rootfs/$f; done
 
# Enter the rootfs and replay
sudo chroot ./amzlinux_rootfs/ /bin/bash -c "rr replay /rr_trace/ruby-0/ -- -ex 'handle SIGPIPE nostop noprint pass' -ex 'source /gdb_ruby.py'"
 
# now we should be in gdb prompt, use gdb commands to run/stop/inspect/watch/reverse-cont etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment