The GDB initialisation file is used to batch-execute commands that must be called prior to debugging, or which are likely to be called only once in a GDB session. These commands would otherwise have to be manually entered at the (gdb) command prompt.
The GDB initialisation file is named gdb.ini
and must be located in the directory from which GDB is started.
A typical initialisation file would:
Set the main symbol file
Set the target executable file
Set the document with which the executable file is to be opened
Configure the connection with the target device
Set any initial breakpoints
An initial breakpoint must be set before the debuggee is started.
Load the GDB script to support Unicode descriptor debugging.
The commands for implementing these operations are defined in the Symbian specific GDB command reference and the GDB command summary. They include: symbol file, epoc-exec-file, set args, target epoc com, break, and source. Further information on some of these commands is provided in the topics How to load the main symbol file and How to display Unicode descriptors.
A typical gdb.ini
configuration file is given below. The file would be used for debugging an ARMI application named foobar.app
which is to be opened with the document example_document.fb
.
symbol-file //x/epoc32/release/armi/udeb/foobar.sym
epoc-exec-file z:\system\apps\foobar\foobar.app
set args c:\documents\Example_document.fb
target epoc com1
break NewApplication
source //x/epoc32/gcc/share/epoc-des.ini