gdbruby.rb

Overview

gdbruby.rb can output these information with live process or core.

This is Ruby port of gdbperl.pl made by Akira Higuchi.

Precondition

Usage

With live process(process id: 24113)

$ gdbruby.rb 24113

With core file. You have to specify path of ruby executable.

$ gdbruby.rb core.24113 `rbenv which ruby`

You can get core file with gcore script or execute gcore command on gdb like below.

$ gdb
(gdb) attach 24113
(gdb) gcore core.24113
(gdb) detach

Options

You can specify options. 0 is interprited as false.

$ gdbruby.rb 24113 verbose_gdb=1 c_trace=1

ToDo

FAQ

Why don’t you call functions such like rb_vm_get_sourceline()

If you use gdbruby.rb with live process, gdb can call these functions. But if you use gdbruby.rb with core file, gdb cannot call c functions. So I re-implement these functions.

Which version does it support?

Ruby 2.0.0 only.