Debugging Ruby C Extension gem

203 Views Asked by At

I've been trying to debug ruby gem made with Ruby C Extension to figure out how it works, so I can modify it to my own use. It's quite an advanced gem and printing values isn't enough. So I started debugging it with gdb and gdb-ruby gem. I created instance of class in ruby and ran a method that later connects to functions written in C. There was no way I could stop at certain line in C function even after placing breakpoint. To debug ruby I use 'pry' gem if that means anything. Is there a straightforward way to place a breakpoint inside C function, so it stops at it when reaching given function/line in C file after running Ruby program?

0

There are 0 best solutions below