Use Named Pipes To Send Input To Program Based On Output
Here's a general example of what I need to do: For example, I would initiate a back trace by sending the command 'bt' to GDB from the program. Then I would search for a word such a
Solution 1:
My recommendation is not to do this. Instead there are two more supportable ways to go:
Write your code in Python directly in gdb. Gdb has been extensible in Python for several years now.
Use the gdb MI ("Machine Interface") approach. There are libraries available to parse this already (not sure if there is one in Python but I assume so). This is better than parsing gdb's command-line output because some pains are taken to avoid gratuitous breakage -- this is the preferred way for programs to interact with gdb.
Post a Comment for "Use Named Pipes To Send Input To Program Based On Output"