is there any support for ruby to invoke and control gdb. I need gdb control from ruby to send gdb commands for c/c++ debugging sessions. i need the tool mentioned in the question given the link below for ruby
Asked
Active
Viewed 64 times
1 Answers
0
The best way to interact programmatically with gdb is to simply use gdb's Python layer to do things. Then you can communicate with it any way that is convenient -- say, by sending JSON messages to it, and having your Python code in gdb respond.
However, the more classic way is to use gdb's MI ("Machine Interface"), which is a mode gdb provides where its output is structured in a way that is more readily parsed.
Googling for "ruby gdb MI" shows some plausible libraries, like this one, or this one.

Tom Tromey
- 21,507
- 2
- 45
- 63
-
thanks Tom for your answer. i have seen those libraries but i am not sure to continue with them. it seems the best way is to communicate with python and ruby as you noticed. Since python gdb have large capacity and great capabilities. i could'not find alternative for ruby in that scope. – RedArrow Mar 01 '18 at 19:49