Additional GDB commands tab has two windows. "Before connection" and "After connection"
Commands in those windows are issued (as described) before or after a good connection to a gdb server.
Examples:
monitor reset
load
Commands in the "Additional Shells" tab also have two windows entitled Before connection and after connection. These command are wrapped by a "Shell " command and queued Before or after connection to the gdb server.
Example:
cmd /c start "GdbServer" "c:\usrPrograms\st-util.exe" -v
In setting/debugger/common, turn on full (debug) log.
You will then see when commands are issued in the Debugger log.
Look for the keyword "connected" in the log.
Example log:
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\
Adding source dir: C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\
Adding file: C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\bin\Debug\ArmGnuPrj.elf
Changing directory to: C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/.
Set variable: PATH=.;c:\User\icc programs\iccv9cortex\lib;c:\User\icc programs\iccv9cortex\GnuArm\bin;c:\User\icc programs\iccv9cortex\GnuArm;c:\User\icc programs\iccv9cortex\GnuArm\lib\gcc\arm-none-eabi\6.3.1;C:\User\icc programs\iccv9cortex\GnuArm\lib\gcc\arm-none-eabi\6.3.1;C:\User\icc programs\iccv9cortex\GnuArm\arm-none-eabi\bin;c:\User\icc programs\iccv9cortex\GnuArm\arm-none-eabi\bin;C:\User\Programs\SubVersion\SubversionClient;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\usr\bin;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
[debug]Command-line: C:\usr\MinGW492\bin\gdb.exe -nx -fullname -quiet -args C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/bin/Debug/ARMGNU~1.ELF
[debug]Working dir : C:\User\ICCPRO~1\ICCV9C~1\CGNUEX~1\ARMGNU~1
Starting debugger: C:\usr\MinGW492\bin\gdb.exe -nx -fullname -quiet -args
C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/bin/Debug/ARMGNU~1.ELF
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Connecting to remote target
Setting breakpoints
[debug]Reading symbols from C:\User\ICCPRO~1\ICCV9C~1\CGNUEX~1\ARMGNU~1\bin\Debug\ARMGNU~1.ELF...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6.1
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.6.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source c:\User\icc programs\iccv9cortex\bin\ImageCraftCB\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1/
[debug]Source directories searched: C:/User/ICCPRO~1/ICCV9C~1/CGNUEX~1/ARMGNU~1;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> shell cmd /c start "STLink Gdb Server" "c:\User\icc programs\iccv9cortex\STUtilCyg\st-util.exe"
[debug]>>>>>>cb_gdb:
[debug]> target remote tcp:localhost:4242
[debug]Remote debugging using tcp:localhost:4242
[debug]0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:
Connected
[debug]> monitor reset
In ?? () ()
[debug]> monitor reset
[debug]>>>>>>cb_gdb:>>>>>>cb_gdb:
[debug]> load
[debug]Loading section .text, size 0x274 lma 0x8000000
[debug]Loading section .data, size 0x43c lma 0x800046e
[debug]Start address 0x80000b1, load size 1712
[debug]Transfer rate: 3 KB/sec, 856 bytes/write.
[debug]>>>>>>cb_gdb:
[debug]> break "C:/User/icc programs/iccv9cortex/CGnuExamples/ArmGnuPrj/Src/main.c:28"
[debug]Breakpoint 2 at 0x8000122: file C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Src\main.c, line 28.
[debug]>>>>>>cb_gdb:
[debug]> continue
[debug]Continuing.
[debug]Note: automatically using hardware breakpoints for read-only addresses.
[debug]Program received signal SIGTRAP, Trace/breakpoint trap.
[debug]0x080000b1 in Reset_Handler () at C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86
[debug]C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86:3985:beg:0x80000b1
[debug]>>>>>>cb_gdb:
Program received signal SIGTRAP, Trace/breakpoint trap.
At C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86
[debug]> bt 30
[debug]#0 0x080000b1 in Reset_Handler () at C:\User\icc programs\iccv9cortex\CGnuExamples\ArmGnuPrj\Setup\startup.S:86
[debug]>>>>>>cb_gdb: