Hi all,
when a WinCE Application initializes, AFAIU,
1) in TApplication.Initialize ( application.inc )
it calls the WidgeSet.AppInit(AppInit) ( line 347 )
2) the TWinCEWidgetSet.AppInit ( winceobject.inc ) is called from the abive call. In line 129, is trying to determine device type to "auto" define the application type ( atDefault,atDesktop,atHandheld,atPDA,atSmartphone ). The call is in line 129 with a check if the developer assigned something else than atDefault. If it doesn't then it calls the GetWinCEPlatform in winceproc.pp.
3) in GetWinCEPlatform ( winceproc.inc ) in line 1456 there is a call to SystemParametersInfo
1456: if SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(buf), @buf, 0)
4) the SystemParametersInfo is in
<-file-exec-and-symbols
"E:/Programming/Projects/DataPlus/LazIfaistos/bin/DPIfaistos-arm-wince.exe"> ^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<-environment-cd .>
^done
(gdb)
<-environment-cd "E:/Programming/Projects/DataPlus/LazIfaistos/bin/"> ^done
(gdb)
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC> &"No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context.\n"
^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"
~"\n"
~"Non-debugging symbols:\n"
~"0x00011f78 SYSTEM_FPC_CPUINIT\n"
^done
(gdb)
<-exec-arguments >
^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<info address main>
&"info address main\n"
~"Symbol \"main\" is a function at address 0x11bec.\n"
^done
(gdb)
<-break-insert -t *72684>
^done,bkpt={number="7",type="breakpoint",disp="del",enabled="y",addr="0x00011bec",func="main",file="DPIfaistos.lpr",line="13",times="0"}
(gdb)
<-break-insert FPC_RAISEEXCEPTION>
^done,bkpt={number="8",type="breakpoint",disp="keep",enabled="y",addr="0x0001a8f4",at="<fpc_raiseexception>",times="0"}
(gdb)
<-break-insert FPC_BREAK_ERROR>
^done,bkpt={number="9",type="breakpoint",disp="keep",enabled="y",addr="0x0001ba30",at="<SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",times="0"}
(gdb)
<-break-insert FPC_RUNERROR>
^done,bkpt={number="10",type="breakpoint",disp="keep",enabled="y",addr="0x0001bb5c",at="<SYSTEM_RUNERROR$WORD+16>",times="0"}
(gdb)
<info file>
&"info file\n"
~"Symbols from
\"E:/Programming/Projects/DataPlus/LazIfaistos/bin/DPIfaistos-arm-wince.exe\".\n"
~"Local exec file:\n"
~"\t`E:/Programming/Projects/DataPlus/LazIfaistos/bin/DPIfaistos-arm-wince.exe', file type pei-arm-little.\n"
~"\tEntry point: 0x20f14\n"
~"\t0x00011000 - 0x0015af40 is .text\n"
~"\t0x0015b000 - 0x001657ec is .data\n"
~"\t0x00166000 - 0x0019a328 is .rdata\n"
~"\t0x0019b000 - 0x0019b008 is .pdata\n"
~"\t0x0019c000 - 0x001b1f10 is .bss\n"
~"\t0x001b2000 - 0x001b3960 is .idata\n"
~"\t0x001b4000 - 0x001b4218 is .rsrc\n"
^done
(gdb)
<-exec-run>
^running
(gdb)
~"Connectig to remote device...\n"
~"Starting on device: \"\\gdb\\wince-stub.exe \"\n"
~"Accepting connection...\n"
~"Uploading file to device: \\gdb\\DPIfaistos-arm-wince.exe\n"
