I want to write a script that will read a process memory, and display its contents with some modification/format. It would be create if i could run a c program inside gdb and send gdb commands from this program. Do you know if it is possible ?
1 Answer
It would be great if i could run a c program inside gdb and send gdb commands from this program.
That's easy:
(gdb) shell /tmp/a.out > /tmp/gdb.script
(gdb) source /tmp/gdb.script
If your gdb is built with Python support, much better scripting support is available. Start here.
1 Comment
Bob5421
 In fact i want more interaction. In your case, the a.out c program generates commands and then run once. But i will look if it is better with your Python link
  