View Issue Details

IDProjectCategoryView StatusLast Update
0037861LazarusDebuggerpublic2020-10-04 21:55
ReporterSven Barth Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformX86_64OSWindows NT 
Product Version2.1 (SVN) 
Fixed in Version2.2 
Summary0037861: No feedback from Debugger/IDE if DLL is missing
DescriptionWhen running an application where a linked DLL (Windows) is missing then there is no feedback, the state of the IDE will simply switch back to "not running" (which is very confusing if one does not look at the debugger output).
Steps To ReproduceRun the following program (obviously without a Foobar.dll existing ;) ):

program tdlltest;

{$mode objfpc}{$H+}

procedure Test; external 'Foobar.dll' name 'Test';

begin
  Test;
end.


The debugging session will immediately stop and nothing further will happen.
Additional InformationThis is with GDB 7.3, GDB 8.2 will crash instead. I've attached both debug outputs
TagsNo tags attached.
Fixed in Revision63950
LazTarget2.2
WidgetsetWin32/Win64
Attached Files

Activities

Sven Barth

2020-10-02 23:24

manager  

gdb-crash-8.2.txt (9,714 bytes)   
=thread-group-added,id="i1"
(gdb) 
<-gdb-set confirm off>
^done
(gdb) 
<-gdb-set new-console off>
^done
(gdb) 
<set width 50000>
&"set width 50000\n"
=cmd-param-changed,param="width",value="50000"
^done
(gdb) 
<set max-value-size 1610612736>
&"set max-value-size 1610612736\n"
=cmd-param-changed,param="max-value-size",value="1610612736"
^done
(gdb) 
<-gdb-version>
~"GNU gdb (GDB) 8.2\n"
~"Copyright (C) 2018 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
~"\nType \"show copying\" and \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-w32-mingw32\".\n"
~"Type \"show configuration\" for configuration details.\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n    <http://www.gnu.org/software/gdb/documentation/>."
~"\n\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
^done
(gdb) 
<maint set internal-error quit no>
&"maint set internal-error quit no\n"
^done
(gdb) 
<maint set internal-error corefile no>
&"maint set internal-error corefile no\n"
^done
(gdb) 
<maint set internal-warning quit no>
&"maint set internal-warning quit no\n"
^done
(gdb) 
<maint set internal-warning corefile no>
&"maint set internal-warning corefile no\n"
^done
(gdb) 
<maint set demangler-warning quit no>
&"maint set demangler-warning quit no\n"
^done
(gdb) 
<maint set demangler-warning corefile no>
&"maint set demangler-warning corefile no\n"
&"Undefined maintenance set demangler-warning command: \"corefile no\".  Try \"help maintenance set demangler-warning\".\n"
^error,msg="Undefined maintenance set demangler-warning command: \"corefile no\".  Try \"help maintenance set demangler-warning\"."
(gdb) 
<-gdb-set env ALLUSERSPROFILE=C:\ProgramData>
^done
(gdb) 
<-gdb-set env APPDATA=C:\Users\Sven\AppData\Roaming>
^done
(gdb) 
<-gdb-set env CommonProgramFiles=C:\Program Files\Common Files>
^done
(gdb) 
<-gdb-set env CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files>
^done
(gdb) 
<-gdb-set env CommonProgramW6432=C:\Program Files\Common Files>
^done
(gdb) 
<-gdb-set env COMPUTERNAME=TAYET>
^done
(gdb) 
<-gdb-set env ComSpec=C:\WINDOWS\system32\cmd.exe>
^done
(gdb) 
<-gdb-set env DriverData=C:\Windows\System32\Drivers\DriverData>
^done
(gdb) 
<-gdb-set env FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer>
^done
(gdb) 
<-gdb-set env FPS_BROWSER_USER_PROFILE_STRING=Default>
^done
(gdb) 
<-gdb-set env HOMEDRIVE=C:>
^done
(gdb) 
<-gdb-set env HOMEPATH=\Users\Sven>
^done
(gdb) 
<-gdb-set env LOCALAPPDATA=C:\Users\Sven\AppData\Local>
^done
(gdb) 
<-gdb-set env LOGONSERVER=\\TAYET>
^done
(gdb) 
<-gdb-set env NUMBER_OF_PROCESSORS=4>
^done
(gdb) 
<-gdb-set env OneDrive=C:\Users\Sven\OneDrive>
^done
(gdb) 
<-gdb-set env OS=Windows_NT>
^done
(gdb) 
<-gdb-set env Path=C:\lazarus\2.0.10\fpc\3.2.0\bin\x86_64-win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\WINDOWS\System32\OpenSSH\;C:\FPC\3.2.0\bin\i386-Win32;C:\Users\Sven\AppData\Local\Microsoft\WindowsApps;C:\Program Files\SDCC\bin>
^done
(gdb) 
<-gdb-set env PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL>
^done
(gdb) 
<-gdb-set env PROCESSOR_ARCHITECTURE=AMD64>
^done
(gdb) 
<-gdb-set env PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 9, GenuineIntel>
^done
(gdb) 
<-gdb-set env PROCESSOR_LEVEL=6>
^done
(gdb) 
<-gdb-set env PROCESSOR_REVISION=8e09>
^done
(gdb) 
<-gdb-set env ProgramData=C:\ProgramData>
^done
(gdb) 
<-gdb-set env ProgramFiles=C:\Program Files>
^done
(gdb) 
<-gdb-set env ProgramFiles(x86)=C:\Program Files (x86)>
^done
(gdb) 
<-gdb-set env ProgramW6432=C:\Program Files>
^done
(gdb) 
<-gdb-set env PSModulePath=C:\Users\Sven\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules>
^done
(gdb) 
<-gdb-set env PUBLIC=C:\Users\Public>
^done
(gdb) 
<-gdb-set env SESSIONNAME=Console>
^done
(gdb) 
<-gdb-set env SystemDrive=C:>
^done
(gdb) 
<-gdb-set env SystemRoot=C:\WINDOWS>
^done
(gdb) 
<-gdb-set env TEMP=C:\Users\Sven\AppData\Local\Temp>
^done
(gdb) 
<-gdb-set env TMP=C:\Users\Sven\AppData\Local\Temp>
^done
(gdb) 
<-gdb-set env USERDOMAIN=TAYET>
^done
(gdb) 
<-gdb-set env USERDOMAIN_ROAMINGPROFILE=TAYET>
^done
(gdb) 
<-gdb-set env USERNAME=Sven>
^done
(gdb) 
<-gdb-set env USERPROFILE=C:\Users\Sven>
^done
(gdb) 
<-gdb-set env windir=C:\WINDOWS>
^done
(gdb) 
<-file-exec-and-symbols "C:/projects/tests/tdlltest.exe">
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<set print elements 500>
&"set print elements 500\n"
=cmd-param-changed,param="print elements",value="500"
^done
(gdb) 
<-environment-cd .>
^done
(gdb) 
<-environment-cd "C:/projects/tests/">
^done
(gdb) 
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>
^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."
(gdb) 
<info functions FPC_CPUINIT>
&"info functions FPC_CPUINIT\n"
~"All functions matching regular expression \"FPC_CPUINIT\":\n"
~"\nNon-debugging symbols:\n"
~"0x0000000100001e60  SYSTEM_$$_FPC_CPUINIT\n"
^done
(gdb) 
<-exec-arguments >
^done
(gdb) 
<-gdb-set case-sensitive off>
&"warning: the current case sensitivity setting does not match the language.\n"
&"\n"
^done
(gdb) 
<set max-value-size 1610612736>
&"set max-value-size 1610612736\n"
^done
(gdb) 
<ptype TObject>
&"ptype TObject\n"
&"No symbol \"TObject\" in current context.\n"
^error,msg="No symbol \"TObject\" in current context."
(gdb) 
<ptype Exception>
&"ptype Exception\n"
&"No symbol \"Exception\" in current context.\n"
^error,msg="No symbol \"Exception\" in current context."
(gdb) 
<ptype Shortstring>
&"ptype Shortstring\n"
&"No symbol \"Shortstring\" in current context.\n"
^error,msg="No symbol \"Shortstring\" in current context."
(gdb) 
<ptype pointer>
&"ptype pointer\n"
&"No symbol \"pointer\" in current context.\n"
^error,msg="No symbol \"pointer\" in current context."
(gdb) 
<ptype byte>
&"ptype byte\n"
&"No symbol \"byte\" in current context.\n"
^error,msg="No symbol \"byte\" in current context."
(gdb) 
<set print elements 2500>
&"set print elements 2500\n"
=cmd-param-changed,param="print elements",value="2500"
^done
(gdb) 
<info file>
&"info file\n"
~"Symbols from \"C:\\projects\\tests\\tdlltest.exe\".\n"
~"Local exec file:\n"
~"\t`C:\\projects\\tests\\tdlltest.exe', file type pei-x86-64.\n"
~"\tEntry point: 0x1000015d0\n"
~"\t0x0000000100001000 - 0x000000010000d880 is .text\n"
~"\t0x000000010000e000 - 0x000000010000e644 is .data\n"
~"\t0x000000010000f000 - 0x00000001000102c4 is .rdata\n"
~"\t0x0000000100011000 - 0x0000000100011ef4 is .pdata\n"
~"\t0x0000000100012000 - 0x0000000100015cf0 is .bss\n"
~"\t0x0000000100016000 - 0x0000000100016018 is .CRT\n"
~"\t0x0000000100017000 - 0x0000000100017b4c is .idata\n"
^done
(gdb) 
<-data-evaluate-expression sizeof(^char)>
^done,value="8"
(gdb) 
<-break-insert main>
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000010000163e",func="main",file="tdlltest.pp",fullname="C:\\projects\\tests\\tdlltest.pp",line="8",thread-groups=["i1"],times="0",original-location="main"}
(gdb) 
<-break-insert *4294972880>
^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00000001000015d0",at="<_mainCRTStartup>",thread-groups=["i1"],times="0",original-location="*4294972880"}
(gdb) 
<-break-insert +0>
^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x000000010000163e",func="main",file="tdlltest.pp",fullname="C:\\projects\\tests\\tdlltest.pp",line="8",thread-groups=["i1"],times="0",original-location="C:\\projects\\tests\\tdlltest.pp:+0"}
(gdb) 
<-exec-run>
=thread-group-started,id="i1",pid="31084"
=thread-created,id="1",group-id="i1"
~"[New Thread 31084.0x5530]\n"
=thread-created,id="2",group-id="i1"
~"[New Thread 31084.0x3134]\n"
=thread-created,id="3",group-id="i1"
~"[New Thread 31084.0x535c]\n"
=thread-created,id="4",group-id="i1"
~"[New Thread 31084.0x7af8]\n"
~"[Thread 31084.0x3134 exited with code 3221225781]\n"
=thread-exited,id="2",group-id="i1"
~"[Thread 31084.0x7af8 exited with code 3221225781]\n"
=thread-exited,id="4",group-id="i1"
=thread-exited,id="1",group-id="i1"
=thread-exited,id="3",group-id="i1"
=thread-group-exited,id="i1"
^error,msg="During startup program exited with code 0xc0000135."
(gdb) 
<kill>
gdb-crash-8.2.txt (9,714 bytes)   
gdb-crash-7.3.txt (10,460 bytes)   
=thread-group-added,id="i1"
(gdb) 
<-gdb-set confirm off>
^done
(gdb) 
<-gdb-set new-console off>
^done
(gdb) 
<set width 50000>
&"set width 50000\n"
^done
(gdb) 
<set max-value-size 1610612736>
&"set max-value-size 1610612736\n"
&"No symbol table is loaded.  Use the \"file\" command.\n"
^error,msg="No symbol table is loaded.  Use the \"file\" command."
(gdb) 
<-gdb-version>
~"GNU gdb (GDB) 7.3.50.20110510-cvs\n"
~"Copyright (C) 2011 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-w64-mingw32\".\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
^done
(gdb) 
<maint set internal-error quit no>
&"maint set internal-error quit no\n"
^done
(gdb) 
<maint set internal-error corefile no>
&"maint set internal-error corefile no\n"
^done
(gdb) 
<maint set internal-warning quit no>
&"maint set internal-warning quit no\n"
^done
(gdb) 
<maint set internal-warning corefile no>
&"maint set internal-warning corefile no\n"
^done
(gdb) 
<maint set demangler-warning quit no>
&"maint set demangler-warning quit no\n"
&"Undefined maintenance set command: \"demangler-warning quit no\".  Try \"help maintenance set\".\n"
^error,msg="Undefined maintenance set command: \"demangler-warning quit no\".  Try \"help maintenance set\"."
(gdb) 
<maint set demangler-warning corefile no>
&"maint set demangler-warning corefile no\n"
&"Undefined maintenance set command: \"demangler-warning corefile no\".  Try \"help maintenance set\".\n"
^error,msg="Undefined maintenance set command: \"demangler-warning corefile no\".  Try \"help maintenance set\"."
(gdb) 
<-gdb-set env ALLUSERSPROFILE=C:\ProgramData>
^done
(gdb) 
<-gdb-set env APPDATA=C:\Users\Sven\AppData\Roaming>
^done
(gdb) 
<-gdb-set env CommonProgramFiles=C:\Program Files\Common Files>
^done
(gdb) 
<-gdb-set env CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files>
^done
(gdb) 
<-gdb-set env CommonProgramW6432=C:\Program Files\Common Files>
^done
(gdb) 
<-gdb-set env COMPUTERNAME=TAYET>
^done
(gdb) 
<-gdb-set env ComSpec=C:\WINDOWS\system32\cmd.exe>
^done
(gdb) 
<-gdb-set env DriverData=C:\Windows\System32\Drivers\DriverData>
^done
(gdb) 
<-gdb-set env FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer>
^done
(gdb) 
<-gdb-set env FPS_BROWSER_USER_PROFILE_STRING=Default>
^done
(gdb) 
<-gdb-set env HOMEDRIVE=C:>
^done
(gdb) 
<-gdb-set env HOMEPATH=\Users\Sven>
^done
(gdb) 
<-gdb-set env LOCALAPPDATA=C:\Users\Sven\AppData\Local>
^done
(gdb) 
<-gdb-set env LOGONSERVER=\\TAYET>
^done
(gdb) 
<-gdb-set env NUMBER_OF_PROCESSORS=4>
^done
(gdb) 
<-gdb-set env OneDrive=C:\Users\Sven\OneDrive>
^done
(gdb) 
<-gdb-set env OS=Windows_NT>
^done
(gdb) 
<-gdb-set env Path=C:\lazarus\2.0.10\fpc\3.2.0\bin\x86_64-win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\WINDOWS\System32\OpenSSH\;C:\FPC\3.2.0\bin\i386-Win32;C:\Users\Sven\AppData\Local\Microsoft\WindowsApps;C:\Program Files\SDCC\bin>
^done
(gdb) 
<-gdb-set env PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL>
^done
(gdb) 
<-gdb-set env PROCESSOR_ARCHITECTURE=AMD64>
^done
(gdb) 
<-gdb-set env PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 9, GenuineIntel>
^done
(gdb) 
<-gdb-set env PROCESSOR_LEVEL=6>
^done
(gdb) 
<-gdb-set env PROCESSOR_REVISION=8e09>
^done
(gdb) 
<-gdb-set env ProgramData=C:\ProgramData>
^done
(gdb) 
<-gdb-set env ProgramFiles=C:\Program Files>
^done
(gdb) 
<-gdb-set env ProgramFiles(x86)=C:\Program Files (x86)>
^done
(gdb) 
<-gdb-set env ProgramW6432=C:\Program Files>
^done
(gdb) 
<-gdb-set env PSModulePath=C:\Users\Sven\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules>
^done
(gdb) 
<-gdb-set env PUBLIC=C:\Users\Public>
^done
(gdb) 
<-gdb-set env SESSIONNAME=Console>
^done
(gdb) 
<-gdb-set env SystemDrive=C:>
^done
(gdb) 
<-gdb-set env SystemRoot=C:\WINDOWS>
^done
(gdb) 
<-gdb-set env TEMP=C:\Users\Sven\AppData\Local\Temp>
^done
(gdb) 
<-gdb-set env TMP=C:\Users\Sven\AppData\Local\Temp>
^done
(gdb) 
<-gdb-set env USERDOMAIN=TAYET>
^done
(gdb) 
<-gdb-set env USERDOMAIN_ROAMINGPROFILE=TAYET>
^done
(gdb) 
<-gdb-set env USERNAME=Sven>
^done
(gdb) 
<-gdb-set env USERPROFILE=C:\Users\Sven>
^done
(gdb) 
<-gdb-set env windir=C:\WINDOWS>
^done
(gdb) 
<-file-exec-and-symbols "C:/projects/tests/tdlltest.exe">
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<set print elements 500>
&"set print elements 500\n"
^done
(gdb) 
<-environment-cd .>
^done
(gdb) 
<-environment-cd "C:/projects/tests/">
^done
(gdb) 
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>
^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."
(gdb) 
<info functions FPC_CPUINIT>
&"info functions FPC_CPUINIT\n"
~"All functions matching regular expression \"FPC_CPUINIT\":\n"
~"\nNon-debugging symbols:\n"
~"0x0000000100001e60  SYSTEM_$$_FPC_CPUINIT\n"
^done
(gdb) 
<-exec-arguments >
^done
(gdb) 
<set max-value-size 1610612736>
&"set max-value-size 1610612736\n"
&"No symbol \"max\" in current context.\n"
^error,msg="No symbol \"max\" in current context."
(gdb) 
<ptype TObject>
&"ptype TObject\n"
&"No symbol \"TObject\" in current context.\n"
^error,msg="No symbol \"TObject\" in current context."
(gdb) 
<ptype Exception>
&"ptype Exception\n"
&"No symbol \"Exception\" in current context.\n"
^error,msg="No symbol \"Exception\" in current context."
(gdb) 
<ptype Shortstring>
&"ptype Shortstring\n"
&"No symbol \"Shortstring\" in current context.\n"
^error,msg="No symbol \"Shortstring\" in current context."
(gdb) 
<ptype pointer>
&"ptype pointer\n"
&"No symbol \"pointer\" in current context.\n"
^error,msg="No symbol \"pointer\" in current context."
(gdb) 
<ptype byte>
&"ptype byte\n"
&"No symbol \"byte\" in current context.\n"
^error,msg="No symbol \"byte\" in current context."
(gdb) 
<set print elements 2500>
&"set print elements 2500\n"
^done
(gdb) 
<info file>
&"info file\n"
~"Symbols from \"C:/projects/tests/tdlltest.exe\".\n"
~"Local exec file:\n"
~"\t`C:/projects/tests/tdlltest.exe', file type pei-x86-64.\n"
~"\tEntry point: 0x1000015d0\n"
~"\t0x0000000100001000 - 0x000000010000d880 is .text\n"
~"\t0x000000010000e000 - 0x000000010000e644 is .data\n"
~"\t0x000000010000f000 - 0x00000001000102c4 is .rdata\n"
~"\t0x0000000100011000 - 0x0000000100011ef4 is .pdata\n"
~"\t0x0000000100012000 - 0x0000000100015cf0 is .bss\n"
~"\t0x0000000100016000 - 0x0000000100016018 is .CRT\n"
~"\t0x0000000100017000 - 0x0000000100017b4c is .idata\n"
^done
(gdb) 
<-data-evaluate-expression sizeof(^char)>
^error,msg="A syntax error in expression, near `char)'."
(gdb) 
<-break-insert main>
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x000000010000163e",func="main",file="tdlltest.pp",fullname="C:/projects/tests/tdlltest.pp",line="8",times="0",original-location="main"}
(gdb) 
<-break-insert *4294972880>
^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00000001000015d0",at="<_mainCRTStartup>",times="0",original-location="*4294972880"}
(gdb) 
<-break-insert +0>
^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x000000010000163e",func="main",file="tdlltest.pp",fullname="C:/projects/tests/tdlltest.pp",line="1",times="0",original-location="tdlltest.pp:1"}
(gdb) 
<-exec-run>
=thread-group-started,id="i1",pid="19316"
=thread-created,id="1",group-id="i1"
~"[New Thread 19316.0x569c]\n"
^running
*running,thread-id="all"
(gdb) 
=thread-created,id="2",group-id="i1"
~"[New Thread 19316.0x970]\n"
*running,thread-id="all"
=thread-exited,id="2",group-id="i1"
=thread-created,id="3",group-id="i1"
~"[New Thread 19316.0x1d6c]\n"
*running,thread-id="all"
=thread-exited,id="3",group-id="i1"
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
^error,msg="During startup program exited with code 0xc0000135."
(gdb) 
<-break-delete 1>
^done
(gdb) 
<-break-delete 2>
^done
(gdb) 
<-break-delete 3>
^done
(gdb) 
<-break-insert *FPC_RAISEEXCEPTION>
^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x000000010000a670",at="<fpc_raiseexception>",times="0",original-location="*FPC_RAISEEXCEPTION"}
(gdb) 
<-break-insert *FPC_BREAK_ERROR>
^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100004e80",at="<SYSTEM_$$_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",times="0",original-location="*FPC_BREAK_ERROR"}
(gdb) 
<-break-insert *FPC_RUNERROR>
^done,bkpt={number="6",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100004f80",at="<SYSTEM_$$_RUNERROR$WORD>",times="0",original-location="*FPC_RUNERROR"}
(gdb) 
<-symbol-list-lines "C:/projects/tests/tdlltest.pp">
^done,lines=[{pc="0x0000000100001630",line="7"},{pc="0x000000010000163e",line="8"},{pc="0x0000000100001643",line="9"},{pc="0x000000010000164a",line="0"}]
(gdb) 
<-exec-continue>
^error,msg="The program is not being run."
(gdb) 
<-break-delete 4>
^done
(gdb) 
<-break-delete 5>
^done
(gdb) 
<-break-delete 6>
^done
(gdb) 
<-file-exec-and-symbols >
^done
(gdb) 
gdb-crash-7.3.txt (10,460 bytes)   

errno

2020-10-03 18:36

reporter   ~0126066

It's interesting to notice that they both show an error message "During startup program exited with code 0xc0000135."

Martin Friebe

2020-10-03 21:23

manager   ~0126069

Actually for me that message came depending on which gdb version I used. But it likely is a timing/race issue. Depending on how fast gdb gets the error from the OS, gdb will print it a bit earlier or later. And the Lazarus IDE only picks it up, if it is printed before a certain point.

Martin Friebe

2020-10-04 16:30

manager   ~0126083

The debugger now has a dialog (similar to the "execution stopped") that will show if the debuggee exited with an exit code <> 0.

This dialog will show whenever there was an exit code (not just during startup).

This dialog can be disabled (Options > Debugger > General). But then its disabled for startup errors as well. In the end from a user point of view there is no difference, if the app exits with an error after it was started, but within a split second thereof, and before it done anything noticeable.

Issue History

Date Modified Username Field Change
2020-10-02 23:24 Sven Barth New Issue
2020-10-02 23:24 Sven Barth Status new => assigned
2020-10-02 23:24 Sven Barth Assigned To => Martin Friebe
2020-10-02 23:24 Sven Barth File Added: gdb-crash-8.2.txt
2020-10-02 23:24 Sven Barth File Added: gdb-crash-7.3.txt
2020-10-03 18:36 errno Note Added: 0126066
2020-10-03 21:23 Martin Friebe Note Added: 0126069
2020-10-04 16:30 Martin Friebe Status assigned => resolved
2020-10-04 16:30 Martin Friebe Resolution open => fixed
2020-10-04 16:30 Martin Friebe Fixed in Version => 2.2
2020-10-04 16:30 Martin Friebe Fixed in Revision => 63950
2020-10-04 16:30 Martin Friebe LazTarget => 2.2
2020-10-04 16:30 Martin Friebe Widgetset Win32/Win64 => Win32/Win64
2020-10-04 16:30 Martin Friebe Note Added: 0126083