Skip to content

Instantly share code, notes, and snippets.

@carld
Created March 10, 2016 22:42
Show Gist options
  • Save carld/442bc8edb9b991dc4c25 to your computer and use it in GitHub Desktop.
Save carld/442bc8edb9b991dc4c25 to your computer and use it in GitHub Desktop.
gdb ruby backtrace
gdb
(gdb) file /opt/ruby-2.2.3/bin/ruby
(gdb) attach [pid]
# output of the C backtrace goes to the gdb console
(gdb) eval "backtrace"
# output of the Ruby application backtrace below goes to ruby stdout (rails logger?)
(gdb) call rb_backtrace()
(gdb) continue
(gdb) [ctrl-c]
(gdb) detach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment