I use ddd as frontend for gdb.
I want to prepare a small file which contains some commands like
(gdb) graph display x
But if I do a
(gdb) source myfile
and myfile contains any graph command the result is:
(gdb) source myfile
x:1: Error in sourced command file:
Undefined command: "graph". Try "help".
(gdb) graph display res
Any idea how I can script ddd. It looks that the source command is executed from gdb and gdb itself knows no "graph" command. But how to load a script in ddd itself?


graph displaycommand is of ddd, not gdb.source <file_name>is of gdb. You can execute gdb commands listed in file using this.So in your case, it is like you are entering
graph displaycommand on gdb. And gdb doesn't know anygraph displaycommand, hence gives error.As per ddd manual, I think there is no such support to load script in ddd yet.