Theo
2018-06-02 23:22:02 UTC
How do I execute GDB commands before the debugger gets attached to a
running program? Attaching with "Run/Attach to Process/Attach to Process
with GDB" seems to be equivalent to "gdb -p procID". I need an
equivalent of the GDB "-command=file" option where I include the attach
command into "file".
Alternatively, this would be possible if I could start GDB without being
attached to a program and use the command line interface "GDB cmd" of
KDevelop to execute my commands, although this would become tedious for
a long list of commands, so it would be more useful if there was a way
to feed a batch of commands at once into GDB.
running program? Attaching with "Run/Attach to Process/Attach to Process
with GDB" seems to be equivalent to "gdb -p procID". I need an
equivalent of the GDB "-command=file" option where I include the attach
command into "file".
Alternatively, this would be possible if I could start GDB without being
attached to a program and use the command line interface "GDB cmd" of
KDevelop to execute my commands, although this would become tedious for
a long list of commands, so it would be more useful if there was a way
to feed a batch of commands at once into GDB.