how to step through debug ruby core (mingw gdb)

configure it with the “right” command line options:

http://railsquestions.blogspot.com/2009/01/compiling-ruby-with-debug-symbols-in.html

then load it up into gdb:

c:>gdb ruby

# run it through once, so it can initialize and load in the dll

(gdb) r whatever.rb

if you want to restart it mid stream then ctrl+c

now

(gdb) break rb_w32_listen

or

(gdb) break EventMachine_t::_ReadLoopBreaker() # break within an extension

or

(gdb) break string.c:616 # break on a line of code

(gdb) r # restart it to run through and break on your breakpoints.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.