External programs and GDB Debugger
The GDB debugger can automatically launch an external program (typically a debugging server) right before a debugging session starts, instead of you having to start it manually beforehand. This is controlled by the "Run a program before starting debugging" option in Remote GDB Debugger options.
How to enable it?
Navigate to Debugger → Debugger options... → Set specific options. This opens a GDB configuration dialog; check the "Run a program before starting debugging" checkbox.

If you enable it, the following options become available:
Choose a configuration
Load one of the pre-defined configurations (command line, memory map and SP value) described in the gdb_arch.cfg file.
Command line
Command line of the program to run. The following special symbols can be used:
• %i: input file name from the Process options dialog
• %p: port number from the Process options dialog
• %e: file name of a temporary ELF file created from the database contents
Initial SP
IDA will set the SP (or a similar register) after connecting to the server
Memory map
Edit the memory map for the external server. It will be used during debugging.
See also
Last updated
Was this helpful?
