Discussion:
Execute GDB commands before attaching to a running program
Theo
2018-06-02 23:22:02 UTC
Permalink
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.
Milian Wolff
2018-07-24 20:37:22 UTC
Permalink
Post by Theo
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.
I don't believe the behavior you describe is implemented. Patches welcome!
--
Milian Wolff
***@milianw.de
http://milianw.de
Loading...