launch gdb and print out variable value using ruby -
i want write ruby program inspect variable value of program launch gdb
, print
value. how achieve this?
if in shell, :
shell > gdb test [...gbd started] (gdb) p variable $1 = 20 (gdb)
i hear other ways can achieve same goal, not necessaliy use gdb.
try open4, allows open stdin, stdout, stderr arbitrary command. use open4 run gdb describe, have done , works quite nicely. might want create wrapper class handles running commands , returning status, open4 gives file handles.
Comments
Post a Comment