Hi ,
I want to write a ruby program that could inspect the variable value of a program by launch the gdb
and then print
that value. How could I achieve this?
If I were in the shell, I would do this :
shell > gdb test
[...gbd started]
(gdb) p variable
$1 = 20
(gdb)
I also like to hear other ways that can achieve the same goal, not necessaliy to use gdb.