Using GDB on Ruby's Guts
Message from 2022
This post is pretty old! Opinions and technical information in it are almost certainly oudated. Commands and configurations will probably not work. Consider the age of the content before putting any of it into practice.
I just happened to see this on Jamis Buck’s Blog today. Looks pretty neat, apparently it’s as simple as calling the rb_raise function from the debugger, which prints a stack trace:
call (void)rb_raise((int)rb_eException, "raising an exception")
You can also apparently chew up the stack in a more complicated fashion. It’ll be neat to figure out what else you can do to a running ruby process.