D:\TEMP>gdb project1.exe
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from D:\TEMP/project1.exe...done.
(gdb) run
Starting program: D:\TEMP/project1.exe
[New Thread 2624.0x2c54]
[New Thread 2624.0x1898]
[New Thread 2624.0x9e0]
[New Thread 2624.0x2d34]
doSomathing1
doSomathing2.1
Program received signal SIGSEGV, Segmentation fault.
fpc_ansistr_assign (DESTS=Cannot access memory at address 0x0
) at E:/ppsrc/rtl/inc/astrings.inc:180
180 if DestS=S2 then
(gdb) bt
#0 fpc_ansistr_assign (DESTS=Cannot access memory at address 0x0
) at E:/ppsrc/rtl/inc/astrings.inc:180
#1 0x0040f81c in DOSOMATHING2 () at unit1.pas:11
#2 0x0040f882 in DOSOMATHING1 () at unit1.pas:17
#3 0x0040f898 in UNIT1_$$_init$ () at unit1.pas:20
#4 0x00408a54 in fpc_initializeunits () at E:/ppsrc/rtl/inc/system.inc:1101
#5 0x004016f9 in main () at D:/TEMP/project1.lpr:5