View Issue Details

IDProjectCategoryView StatusLast Update
0020264LazarusDebuggerpublic2011-09-18 21:39
ReporterLudo Brands Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Fixed in Version0.9.31 (SVN) 
Summary0020264: Setting breakpoints on a line that is not generating code can cause breaks in another unit.
DescriptionWhen a breakpoint is set on a line that is not generating code, the breakpoint will be set on the first code encountered thereafter. When there is no more code in the unit, the breakpoint will be set in the next unit, whatever that is. The problem occurs when putting breakpoints in conditional code. As long as the program isn't build, the "blue dots" indicating executable code aren't present and breakpoints can easily be set on code that won't be compiled. Because the debugger breaks at an unexpected place/unit and no red dot/line indicating a breakpoint is inserted, it can take a while before understanding why the debugger breaks and where the "wrong" breakpoint is.
I understand why the breakpoint has to be fuzzy since lines such as begin or end don't always generate code. Limiting this fuzzyness to the same unit and to x lines beyond would be helpful.
TagsNo tags attached.
Fixed in Revision32410
LazTarget0.99.0
WidgetsetWin32/Win64
Attached Files

Activities

Martin Friebe

2011-09-17 22:39

manager   ~0051967

The problem is in gdb, which is currently used by Lazarus.
Lazarus does tell gdb the exact line, but gdb does it's own choice.

It may be possible to check in advance if the desired breakpoint location exists, by asking for the entire line-info of the unit in question and then verify the desired line has debug info.
Such an approach can dramatically slow down staring an application. If the app has breakpoints across many units, then all of the units need to be verified.
If ever implemented, it will probably be optional.

A better approach, that should probably be implemented, is to verify the stack location at the time of the breakpoint hit, against the location originally desired. If not matching an appropriate message can be displayed.

Ludo Brands

2011-09-18 12:16

developer   ~0051974

When you do in gdb "info line source:line" for a line that is beyond the last one that created code, gdb returns "Line number x is out of range for "source" ".
Checking this before setting the breakpoint at source:line would be enough to avoid "out of unit" breakpoints which are the most annoying, especially when breaking in code without debug info. Or am I missing something?

Martin Friebe

2011-09-18 12:50

manager   ~0051975

Thanks for the update, I hadn't tried that => that can of course be used.
I have to test, how this works, with lines that are unavailable in the middle of a file.

Ludo Brands

2011-09-18 14:26

developer   ~0051978

Last edited: 2011-09-18 14:43

In the middle of the file for "info line contest.pas:130" gdb returns "Line 130 of "contest.pas" is at address 0x401721 <main+129> but contains no code."

If you do then "info line *0x401721" you get "Line 143 of "contest.pas" starts at address 0x401721 <main+129> and ends at 0x401730 <main+144>." So you can deduct that between line 130 (the line initially requested) and line 143 there is no code. One needs to check that these lines are not comments (Edit: or just empty lines) to conclude that this is conditional code that is not compiled or code removed by the smart linking.

"info line *0x401720" (1 byte less) returns "Line 127 of "contest.pas" starts at address 0x401712 <main+114> and ends at 0x401721 <main+129>.". Indeed 128 to 142 are non-code lines in my test program.

Martin Friebe

2011-09-18 16:10

manager   ~0051984

line info test implemented in r 32405

please test and close if ok.

thanks for the help

Ludo Brands

2011-09-18 17:09

developer   ~0051986

updated to 32406 and can't get any breakpoints to work. Setting a breakpoint on a "blue point" turns the line green instead of red.
Also when the program finishes there is an exception runerror 131 in LNFODWRF_SEEK$INT64 with the message:
###(gdb unparsed remainder:s 0x0 out of bounds>)###

Martin Friebe

2011-09-18 18:30

manager   ~0051988

Last edited: 2011-09-18 18:50

Are you using stabs or dwarf? Which version of fpc? Which version of GDB

please see:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Create_a_new_Report

please attach content of the "debug output" window

Edit: also 32 or 64 bit and OS

Ludo Brands

2011-09-18 19:32

developer   ~0051991

Last edited: 2011-09-18 19:50

Used to be stabs but latest lazarus changed that to Automatic (dwarf with sets).
windows XP sp2 32 bit. fpc svn 2.7.1 18901. gdb 7.3
Lazarus svn 32404 works fine with dwarf2 and stabs.
Attached debug output for program run without breakpoints: run_no_breakpoints.log.
Debug output for program paused and set breakpoint: pause_set_breakpoint.log. There you'll see that the filename contains spaces that it needs to be double quoted. From gdb cli info line "C:\Documents and Settings\Ludo\Mes documents\Lazarus Projects\test\BufDataSet\contest.pas":144 works.

EDIT: added run_no_breakpoints_b.log. Run program from b:\, no space in filename. No exception and breakpoints can be set without problem. Out of unit test works.

EDIT: the program that raised the error is linked with heaptrc. Remove heaptrc and the exception is gone.

2011-09-18 19:32

 

pause_set_breakpoint.log (33,860 bytes)   
<-file-exec-and-symbols "C:/Documents and Settings/Ludo/Mes documents/Lazarus Projects/test/BufDataSet/contest.exe">
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<-environment-cd .>
^done
(gdb) 
<-environment-cd "C:/Documents and Settings/Ludo/Mes documents/Lazarus Projects/test/BufDataSet/">
^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"
~"0x00402160  SYSTEM_FPC_CPUINIT\n"
^done
(gdb) 
<-exec-arguments >
^done
(gdb) 
<set width 50000>
&"set width 50000\n"
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<info address main>
&"info address main\n"
~"Symbol \"main\" is a function at address 0x4016c0.\n"
^done
(gdb) 
<-break-insert -t *4200128>
^done,bkpt={number="13",type="breakpoint",disp="del",enabled="y",addr="0x004016c0",func="main",file="contest.pas",fullname="c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.pas",line="105",times="0",original-location="*4200128"}
(gdb) 
<ptype TObject>
&"ptype TObject\n"
~"type = ^TOBJECT = class \n"
~"  public\n"
~"    function  CREATE () : TOBJECT;\n"
~"    procedure DESTROY (); virtual;\n"
~"    function  NEWINSTANCE () : TOBJECT; virtual;\n"
~"    procedure FREEINSTANCE (); virtual;\n"
~"    function  SAFECALLEXCEPTION () : HRESULT; virtual;\n"
~"    procedure DEFAULTHANDLER (); virtual;\n"
~"    procedure FREE ();\n"
~"    function  INITINSTANCE () : TOBJECT;\n"
~"    procedure CLEANUPINSTANCE ();\n"
~"    function  CLASSTYPE () : TCLASS;\n"
~"    function  CLASSINFO () : POINTER;\n"
~"    function  CLASSNAME () : SHORTSTRING;\n"
~"    function  CLASSNAMEIS () : BOOLEAN;\n"
~"    function  CLASSPARENT () : TCLASS;\n"
~"    function  INSTANCESIZE () : LONGINT;\n"
~"    function  INHERITSFROM () : BOOLEAN;\n"
~"    function  STRINGMESSAGETABLE () : PSTRINGMESSAGETABLE;\n"
~"    function  METHODADDRESS () : POINTER;\n"
~"    function  METHODNAME () : SHORTSTRING;\n"
~"    function  FIELDADDRESS () : POINTER;\n"
~"    procedure AFTERCONSTRUCTION (); virtual;\n"
~"    procedure BEFOREDESTRUCTION (); virtual;\n"
~"    procedure DEFAULTHANDLERSTR (); virtual;\n"
~"    procedure DISPATCH (); virtual;\n"
~"    procedure DISPATCHSTR (); virtual;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACEBYSTR () : BOOLEAN;\n"
~"    function  GETINTERFACEWEAK () : BOOLEAN;\n"
~"    function  GETINTERFACEENTRY () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACEENTRYBYSTR () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACETABLE () : PINTERFACETABLE;\n"
~"    function  UNITNAME () : ANSISTRING;\n"
~"    function  EQUALS () : BOOLEAN; virtual;\n"
~"    function  GETHASHCODE () : LONGINT; virtual;\n"
~"    function  TOSTRING () : ANSISTRING; virtual;\n"
~"end\n"
^done
(gdb) 
<ptype Exception>
&"ptype Exception\n"
~"type = ^EXCEPTION = class : public TOBJECT \n"
~"  private\n"
~"    FMESSAGE : ANSISTRING;\n"
~"    FHELPCONTEXT : LONGINT;\n"
~"    HELPCONTEXT : LONGINT;\n"
~"    MESSAGE : ANSISTRING;\n"
~"\n"
~"  public\n"
~"    function  CREATE () : EXCEPTION;\n"
~"    function  CREATEFMT () : EXCEPTION;\n"
~"    function  CREATERES () : EXCEPTION;\n"
~"    function  CREATERESFMT () : EXCEPTION;\n"
~"    function  CREATEHELP () : EXCEPTION;\n"
~"    function  CREATEFMTHELP () : EXCEPTION;\n"
~"    function  CREATERESHELP () : EXCEPTION;\n"
~"    function  CREATERESFMTHELP () : EXCEPTION;\n"
~"end\n"
^done
(gdb) 
<ptype Shortstring>
&"ptype Shortstring\n"
~"type = ShortString = record \n"
~"    length : BYTE;\n"
~"    st : array [0..-1] of CHAR;\n"
~"end\n"
^done
(gdb) 
<ptype pointer>
&"ptype pointer\n"
~"type = ^pointer\n"
^done
(gdb) 
<ptype byte>
&"ptype byte\n"
~"type = BYTE\n"
^done
(gdb) 
<info address FPC_RAISEEXCEPTION>
&"info address FPC_RAISEEXCEPTION\n"
~"Symbol \"FPC_RAISEEXCEPTION\" is at 0x409590 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4232592>
^done,bkpt={number="14",type="breakpoint",disp="keep",enabled="y",addr="0x00409590",at="<fpc_raiseexception>",times="0",original-location="*4232592"}
(gdb) 
<info address FPC_BREAK_ERROR>
&"info address FPC_BREAK_ERROR\n"
~"Symbol \"FPC_BREAK_ERROR\" is at 0x40abb0 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4238256>
^done,bkpt={number="15",type="breakpoint",disp="keep",enabled="y",addr="0x0040abb0",at="<SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",times="0",original-location="*4238256"}
(gdb) 
<info address FPC_RUNERROR>
&"info address FPC_RUNERROR\n"
~"Symbol \"FPC_RUNERROR\" is at 0x40ac90 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4238480>
^done,bkpt={number="16",type="breakpoint",disp="keep",enabled="y",addr="0x0040ac90",at="<SYSTEM_RUNERROR$WORD>",times="0",original-location="*4238480"}
(gdb) 
<info file>
&"info file\n"
~"Symbols from \"c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.exe\".\n"
~"Local exec file:\n"
~"\t`c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.exe', file type pei-i386.\n"
~"\tEntry point: 0x440c50\n"
~"\t0x00401000 - 0x00440c90 is .text\n"
~"\t0x00441000 - 0x0044b7dc is .data\n"
~"\t0x0044c000 - 0x00450a74 is .bss\n"
~"\t0x00452000 - 0x00452c54 is .idata\n"
^done
(gdb) 
<-data-evaluate-expression sizeof(POINTER)>
^done,value="4"
(gdb) 
<-break-insert -f foo>
&"Function \"foo\" not defined.\n"
^done,bkpt={number="17",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="foo",times="0",original-location="foo"}
(gdb) 
<-break-delete 17>
^done
(gdb) 
<-exec-run>
=thread-group-started,id="i1",pid="4624"
=thread-created,id="1",group-id="i1"
~"[New Thread 4624.0xeec]\n"
^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",target-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",host-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\imagehlp.dll",target-name="C:\\WINDOWS\\system32\\imagehlp.dll",host-name="C:\\WINDOWS\\system32\\imagehlp.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\oleaut32.dll",target-name="C:\\WINDOWS\\system32\\oleaut32.dll",host-name="C:\\WINDOWS\\system32\\oleaut32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\ole32.dll",target-name="C:\\WINDOWS\\system32\\ole32.dll",host-name="C:\\WINDOWS\\system32\\ole32.dll",symbols-loaded="0",thread-group="i1"
*stopped,reason="breakpoint-hit",disp="del",bkptno="13",frame={addr="0x004016c0",func="main",args=[],file="contest.pas",fullname="c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.pas",line="105"},thread-id="1",stopped-threads="all"
(gdb) 
<info program>
&"info program\n"
~"\tUsing the running image of child Thread 4624.0xeec.\n"
~"Program stopped at 0x4016c0.\n"
~"It stopped at a breakpoint that has since been deleted.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
^done
(gdb) 
<-symbol-list-lines C:\Documents and Settings\Ludo\Mes documents\Lazarus Projects\test\BufDataSet\contest.pas>
^error,msg="-symbol-list-lines: Usage: SOURCE_FILENAME"
(gdb) 
<-symbol-list-lines contest.pas>
^done,lines=[{pc="0x00000000",line="0"},{pc="0x004016c0",line="105"},{pc="0x004016ce",line="120"},{pc="0x004016d8",line="121"},{pc="0x004016e7",line="122"},{pc="0x004016f6",line="123"},{pc="0x00401705",line="124"},{pc="0x00401714",line="125"},{pc="0x00401723",line="126"},{pc="0x00401732",line="127"},{pc="0x00401741",line="143"},{pc="0x00401750",line="144"},{pc="0x0040175f",line="145"},{pc="0x0040176e",line="146"},{pc="0x0040177f",line="147"},{pc="0x00401789",line="0"},{pc="0x00401795",line="0"},{pc="0x004017a5",line="0"}]
(gdb) 
<-exec-continue>
^running
*running,thread-id="all"
(gdb) 
=thread-created,id="2",group-id="i1"
~"[New Thread 4624.0x1ac8]\n"
*running,thread-id="all"
~"[Switching to Thread 4624.0x1ac8]\n"
*stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x7c911231",func="ntdll!DbgUiConnectToDbg",args=[],from="C:\\WINDOWS\\system32\\ntdll.dll"},thread-id="2",stopped-threads="all"
=thread-selected,id="2"
(gdb) 
<info program>
&"info program\n"
~"\tUsing the running image of child Thread 4624.0x1ac8.\n"
~"Program stopped at 0x7c911231.\n"
~"It stopped with signal SIGTRAP, Trace/breakpoint trap.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
^done
(gdb) 
<-thread-list-ids>
^done,thread-ids={thread-id="2",thread-id="1"},current-thread-id="2",number-of-threads="2"
(gdb) 
<-thread-select 1>
^done,new-thread-id="1",frame={level="0",addr="0x7c91eb94",func="ntdll!LdrAccessResource",args=[],from="C:\\WINDOWS\\system32\\ntdll.dll"}
(gdb) 
<-stack-list-frames 0 0>
^done,stack=[frame={level="0",addr="0x7c91eb94",func="ntdll!LdrAccessResource",from="C:\\WINDOWS\\system32\\ntdll.dll"}]
(gdb) 
<-data-disassemble -s 2089937771 -e 2089937772 -- 0>
^done,asm_insns=[{address="0x7c91eb6b",func-name="ntdll!LdrAlternateResourcesEnabled",offset="46",inst="add    %al,(%eax)"}]
(gdb) 
<-data-disassemble -s 2089937725 -e 2089938036 -- 1>
^done,asm_insns=[{address="0x7c91eb3d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="0",inst="push   %ebp"},{address="0x7c91eb3e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="1",inst="mov    %esp,%ebp"},{address="0x7c91eb40",func-name="ntdll!LdrAlternateResourcesEnabled",offset="3",inst="sub    $0x50,%esp"},{address="0x7c91eb43",func-name="ntdll!LdrAlternateResourcesEnabled",offset="6",inst="mov    %eax,0xc(%esp)"},{address="0x7c91eb47",func-name="ntdll!LdrAlternateResourcesEnabled",offset="10",inst="mov    %fs:0x18,%eax"},{address="0x7c91eb4d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="16",inst="mov    0x1a4(%eax),%eax"},{address="0x7c91eb53",func-name="ntdll!LdrAlternateResourcesEnabled",offset="22",inst="mov    %eax,(%esp)"},{address="0x7c91eb56",func-name="ntdll!LdrAlternateResourcesEnabled",offset="25",inst="movl   $0x0,0x4(%esp)"},{address="0x7c91eb5e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="33",inst="movl   $0x0,0x8(%esp)"},{address="0x7c91eb66",func-name="ntdll!LdrAlternateResourcesEnabled",offset="41",inst="movl   $0x0,0x10(%esp)"},{address="0x7c91eb6e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="49",inst="push   %esp"},{address="0x7c91eb6f",func-name="ntdll!LdrAlternateResourcesEnabled",offset="50",inst="call   0x7c91ebac <ntdll!RtlRandomEx>"},{address="0x7c91eb74",func-name="ntdll!LdrAlternateResourcesEnabled",offset="55",inst="mov    (%esp),%eax"},{address="0x7c91eb77",func-name="ntdll!LdrAlternateResourcesEnabled",offset="58",inst="mov    %ebp,%esp"},{address="0x7c91eb79",func-name="ntdll!LdrAlternateResourcesEnabled",offset="60",inst="pop    %ebp"},{address="0x7c91eb7a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="61",inst="ret    "},{address="0x7c91eb7b",func-name="ntdll!LdrAlternateResourcesEnabled",offset="62",inst="nop"},{address="0x7c91eb7c",func-name="ntdll!LdrAlternateResourcesEnabled",offset="63",inst="lea    0x0(%esp),%esp"},{address="0x7c91eb83",func-name="ntdll!LdrAlternateResourcesEnabled",offset="70",inst="lea    0x0(%ecx),%ecx"},{address="0x7c91eb86",func-name="ntdll!LdrAlternateResourcesEnabled",offset="73",inst="nop"},{address="0x7c91eb87",func-name="ntdll!LdrAlternateResourcesEnabled",offset="74",inst="nop"},{address="0x7c91eb88",func-name="ntdll!LdrAlternateResourcesEnabled",offset="75",inst="nop"},{address="0x7c91eb89",func-name="ntdll!LdrAlternateResourcesEnabled",offset="76",inst="nop"},{address="0x7c91eb8a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="77",inst="nop"},{address="0x7c91eb8b",func-name="ntdll!LdrAccessOutOfProcessResource",offset="0",inst="mov    %esp,%edx"},{address="0x7c91eb8d",func-name="ntdll!LdrAccessOutOfProcessResource",offset="2",inst="sysenter "},{address="0x7c91eb8f",func-name="ntdll!LdrAccessOutOfProcessResource",offset="4",inst="nop"},{address="0x7c91eb90",func-name="ntdll!LdrAccessOutOfProcessResource",offset="5",inst="nop"},{address="0x7c91eb91",func-name="ntdll!LdrAccessOutOfProcessResource",offset="6",inst="nop"},{address="0x7c91eb92",func-name="ntdll!LdrAccessOutOfProcessResource",offset="7",inst="nop"},{address="0x7c91eb93",func-name="ntdll!LdrAccessOutOfProcessResource",offset="8",inst="nop"},{address="0x7c91eb94",func-name="ntdll!LdrAccessResource",offset="0",inst="ret    "},{address="0x7c91eb95",func-name="ntdll!LdrAccessResource",offset="1",inst="lea    0x0(%esp),%esp"},{address="0x7c91eb9c",func-name="ntdll!LdrAccessResource",offset="8",inst="lea    0x0(%esp),%esp"},{address="0x7c91eba0",func-name="ntdll!LdrAccessResource",offset="12",inst="nop"},{address="0x7c91eba1",func-name="ntdll!LdrAccessResource",offset="13",inst="nop"},{address="0x7c91eba2",func-name="ntdll!LdrAccessResource",offset="14",inst="nop"},{address="0x7c91eba3",func-name="ntdll!LdrAccessResource",offset="15",inst="nop"},{address="0x7c91eba4",func-name="ntdll!LdrAccessResource",offset="16",inst="nop"},{address="0x7c91eba5",func-name="ntdll!LdrAddRefDll",offset="0",inst="lea    0x8(%esp),%edx"},{address="0x7c91eba9",func-name="ntdll!LdrAddRefDll",offset="4",inst="int    $0x2e"},{address="0x7c91ebab",func-name="ntdll!LdrAddRefDll",offset="6",inst="ret    "},{address="0x7c91ebac",func-name="ntdll!RtlRandomEx",offset="0",inst="push   %ebp"},{address="0x7c91ebad",func-name="ntdll!RtlRandomEx",offset="1",inst="mov    %esp,%ebp"},{address="0x7c91ebaf",func-name="ntdll!RtlRandomEx",offset="3",inst="pushf  "},{address="0x7c91ebb0",func-name="ntdll!RtlRandomEx",offset="4",inst="sub    $0x2d0,%esp"},{address="0x7c91ebb6",func-name="ntdll!RtlRandomEx",offset="10",inst="mov    %eax,-0x224(%ebp)"},{address="0x7c91ebbc",func-name="ntdll!RtlRandomEx",offset="16",inst="mov    %ecx,-0x228(%ebp)"},{address="0x7c91ebc2",func-name="ntdll!RtlRandomEx",offset="22",inst="mov    0x8(%ebp),%eax"},{address="0x7c91ebc5",func-name="ntdll!RtlRandomEx",offset="25",inst="mov    0x4(%ebp),%ecx"},{address="0x7c91ebc8",func-name="ntdll!RtlRandomEx",offset="28",inst="mov    %ecx,0xc(%eax)"},{address="0x7c91ebcb",func-name="ntdll!RtlRandomEx",offset="31",inst="lea    -0x2d4(%ebp),%eax"},{address="0x7c91ebd1",func-name="ntdll!RtlRandomEx",offset="37",inst="mov    %ecx,0xb8(%eax)"},{address="0x7c91ebd7",func-name="ntdll!RtlRandomEx",offset="43",inst="mov    %ebx,0xa4(%eax)"},{address="0x7c91ebdd",func-name="ntdll!RtlRandomEx",offset="49",inst="mov    %edx,0xa8(%eax)"},{address="0x7c91ebe3",func-name="ntdll!RtlRandomEx",offset="55",inst="mov    %esi,0xa0(%eax)"},{address="0x7c91ebe9",func-name="ntdll!RtlRandomEx",offset="61",inst="mov    %edi,0x9c(%eax)"},{address="0x7c91ebef",func-name="ntdll!RtlRandomEx",offset="67",inst="lea    0xc(%ebp),%ecx"},{address="0x7c91ebf2",func-name="ntdll!RtlRandomEx",offset="70",inst="mov    %ecx,0xc4(%eax)"},{address="0x7c91ebf8",func-name="ntdll!RtlRandomEx",offset="76",inst="mov    0x0(%ebp),%ecx"},{address="0x7c91ebfb",func-name="ntdll!RtlRandomEx",offset="79",inst="mov    %ecx,0xb4(%eax)"},{address="0x7c91ec01",func-name="ntdll!RtlRandomEx",offset="85",inst="mov    -0x4(%ebp),%ecx"},{address="0x7c91ec04",func-name="ntdll!RtlRandomEx",offset="88",inst="mov    %ecx,0xc0(%eax)"},{address="0x7c91ec0a",func-name="ntdll!RtlRandomEx",offset="94",inst="mov    %cs,0xbc(%eax)"},{address="0x7c91ec10",func-name="ntdll!RtlRandomEx",offset="100",inst="mov    %ds,0x98(%eax)"},{address="0x7c91ec16",func-name="ntdll!RtlRandomEx",offset="106",inst="mov    %es,0x94(%eax)"},{address="0x7c91ec1c",func-name="ntdll!RtlRandomEx",offset="112",inst="mov    %fs,0x90(%eax)"},{address="0x7c91ec22",func-name="ntdll!RtlRandomEx",offset="118",inst="mov    %gs,0x8c(%eax)"},{address="0x7c91ec28",func-name="ntdll!RtlRandomEx",offset="124",inst="mov    %ss,0xc8(%eax)"},{address="0x7c91ec2e",func-name="ntdll!RtlRandomEx",offset="130",inst="movl   $0x10007,(%eax)"},{address="0x7c91ec34",func-name="ntdll!RtlRandomEx",offset="136",inst="push   $0x1"},{address="0x7c91ec36",func-name="ntdll!RtlRandomEx",offset="138",inst="push   %eax"},{address="0x7c91ec37",func-name="ntdll!RtlRandomEx",offset="139",inst="pushl  0x8(%ebp)"},{address="0x7c91ec3a",func-name="ntdll!RtlRandomEx",offset="142",inst="call   0x7c91e252 <ntdll!ZwRaiseException>"},{address="0x7c91ec3f",func-name="ntdll!RtlRandomEx",offset="147",inst="sub    $0x20,%esp"},{address="0x7c91ec42",func-name="ntdll!RtlRandomEx",offset="150",inst="mov    %eax,(%esp)"},{address="0x7c91ec45",func-name="ntdll!RtlRandomEx",offset="153",inst="movl   $0x1,0x4(%esp)"},{address="0x7c91ec4d",func-name="ntdll!RtlRandomEx",offset="161",inst="movl   $0x0,0x10(%esp)"},{address="0x7c91ec55",func-name="ntdll!RtlRandomEx",offset="169",inst="mov    0x8(%ebp),%eax"},{address="0x7c91ec58",func-name="ntdll!RtlRandomEx",offset="172",inst="mov    %eax,0x8(%esp)"},{address="0x7c91ec5c",func-name="ntdll!RtlRandomEx",offset="176",inst="mov    %esp,%eax"},{address="0x7c91ec5e",func-name="ntdll!RtlRandomEx",offset="178",inst="push   %eax"},{address="0x7c91ec5f",func-name="ntdll!RtlRandomEx",offset="179",inst="call   0x7c91ebac <ntdll!RtlRandomEx>"},{address="0x7c91ec64",func-name="ntdll!RtlRandomEx",offset="184",inst="int3   "},{address="0x7c91ec65",func-name="ntdll!RtlRandomEx",offset="185",inst="int3   "},{address="0x7c91ec66",func-name="ntdll!RtlRandomEx",offset="186",inst="int3   "},{address="0x7c91ec67",func-name="ntdll!RtlRandomEx",offset="187",inst="int3   "},{address="0x7c91ec68",func-name="ntdll!RtlRandomEx",offset="188",inst="int3   "},{address="0x7c91ec69",func-name="ntdll!RtlRandomEx",offset="189",inst="int3   "},{address="0x7c91ec6a",func-name="ntdll!RtlRandomEx",offset="190",inst="nop"},{address="0x7c91ec6b",func-name="ntdll!RtlRandomEx",offset="191",inst="nop"},{address="0x7c91ec6c",func-name="ntdll!RtlRandomEx",offset="192",inst="nop"},{address="0x7c91ec6d",func-name="ntdll!RtlRandomEx",offset="193",inst="nop"},{address="0x7c91ec6e",func-name="ntdll!RtlRandomEx",offset="194",inst="nop"},{address="0x7c91ec6f",func-name="strstr",offset="0",inst="mov    0x8(%esp),%ecx"},{address="0x7c91ec73",func-name="strstr",offset="4",inst="push   %edi"}]
(gdb) 
<-data-disassemble -s 2089937725 -e 2089937803 -- 1>
^done,asm_insns=[{address="0x7c91eb3d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="0",inst="push   %ebp"},{address="0x7c91eb3e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="1",inst="mov    %esp,%ebp"},{address="0x7c91eb40",func-name="ntdll!LdrAlternateResourcesEnabled",offset="3",inst="sub    $0x50,%esp"},{address="0x7c91eb43",func-name="ntdll!LdrAlternateResourcesEnabled",offset="6",inst="mov    %eax,0xc(%esp)"},{address="0x7c91eb47",func-name="ntdll!LdrAlternateResourcesEnabled",offset="10",inst="mov    %fs:0x18,%eax"},{address="0x7c91eb4d",func-name="ntdll!LdrAlternateResourcesEnabled",offset="16",inst="mov    0x1a4(%eax),%eax"},{address="0x7c91eb53",func-name="ntdll!LdrAlternateResourcesEnabled",offset="22",inst="mov    %eax,(%esp)"},{address="0x7c91eb56",func-name="ntdll!LdrAlternateResourcesEnabled",offset="25",inst="movl   $0x0,0x4(%esp)"},{address="0x7c91eb5e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="33",inst="movl   $0x0,0x8(%esp)"},{address="0x7c91eb66",func-name="ntdll!LdrAlternateResourcesEnabled",offset="41",inst="movl   $0x0,0x10(%esp)"},{address="0x7c91eb6e",func-name="ntdll!LdrAlternateResourcesEnabled",offset="49",inst="push   %esp"},{address="0x7c91eb6f",func-name="ntdll!LdrAlternateResourcesEnabled",offset="50",inst="call   0x7c91ebac <ntdll!RtlRandomEx>"},{address="0x7c91eb74",func-name="ntdll!LdrAlternateResourcesEnabled",offset="55",inst="mov    (%esp),%eax"},{address="0x7c91eb77",func-name="ntdll!LdrAlternateResourcesEnabled",offset="58",inst="mov    %ebp,%esp"},{address="0x7c91eb79",func-name="ntdll!LdrAlternateResourcesEnabled",offset="60",inst="pop    %ebp"},{address="0x7c91eb7a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="61",inst="ret    "},{address="0x7c91eb7b",func-name="ntdll!LdrAlternateResourcesEnabled",offset="62",inst="nop"},{address="0x7c91eb7c",func-name="ntdll!LdrAlternateResourcesEnabled",offset="63",inst="lea    0x0(%esp),%esp"},{address="0x7c91eb83",func-name="ntdll!LdrAlternateResourcesEnabled",offset="70",inst="lea    0x0(%ecx),%ecx"},{address="0x7c91eb86",func-name="ntdll!LdrAlternateResourcesEnabled",offset="73",inst="nop"},{address="0x7c91eb87",func-name="ntdll!LdrAlternateResourcesEnabled",offset="74",inst="nop"},{address="0x7c91eb88",func-name="ntdll!LdrAlternateResourcesEnabled",offset="75",inst="nop"},{address="0x7c91eb89",func-name="ntdll!LdrAlternateResourcesEnabled",offset="76",inst="nop"},{address="0x7c91eb8a",func-name="ntdll!LdrAlternateResourcesEnabled",offset="77",inst="nop"}]
(gdb) 
<-data-disassemble -s 2089937803 -e 2089937812 -- 1>
^done,asm_insns=[{address="0x7c91eb8b",func-name="ntdll!LdrAccessOutOfProcessResource",offset="0",inst="mov    %esp,%edx"},{address="0x7c91eb8d",func-name="ntdll!LdrAccessOutOfProcessResource",offset="2",inst="sysenter "},{address="0x7c91eb8f",func-name="ntdll!LdrAccessOutOfProcessResource",offset="4",inst="nop"},{address="0x7c91eb90",func-name="ntdll!LdrAccessOutOfProcessResource",offset="5",inst="nop"},{address="0x7c91eb91",func-name="ntdll!LdrAccessOutOfProcessResource",offset="6",inst="nop"},{address="0x7c91eb92",func-name="ntdll!LdrAccessOutOfProcessResource",offset="7",inst="nop"},{address="0x7c91eb93",func-name="ntdll!LdrAccessOutOfProcessResource",offset="8",inst="nop"}]
(gdb) 
<-data-disassemble -s 2089937812 -e 2089937829 -- 1>
^done,asm_insns=[{address="0x7c91eb94",func-name="ntdll!LdrAccessResource",offset="0",inst="ret    "},{address="0x7c91eb95",func-name="ntdll!LdrAccessResource",offset="1",inst="lea    0x0(%esp),%esp"},{address="0x7c91eb9c",func-name="ntdll!LdrAccessResource",offset="8",inst="lea    0x0(%esp),%esp"},{address="0x7c91eba0",func-name="ntdll!LdrAccessResource",offset="12",inst="nop"},{address="0x7c91eba1",func-name="ntdll!LdrAccessResource",offset="13",inst="nop"},{address="0x7c91eba2",func-name="ntdll!LdrAccessResource",offset="14",inst="nop"},{address="0x7c91eba3",func-name="ntdll!LdrAccessResource",offset="15",inst="nop"},{address="0x7c91eba4",func-name="ntdll!LdrAccessResource",offset="16",inst="nop"}]
(gdb) 
<-data-disassemble -s 2089937829 -e 2089937836 -- 1>
^done,asm_insns=[{address="0x7c91eba5",func-name="ntdll!LdrAddRefDll",offset="0",inst="lea    0x8(%esp),%edx"},{address="0x7c91eba9",func-name="ntdll!LdrAddRefDll",offset="4",inst="int    $0x2e"},{address="0x7c91ebab",func-name="ntdll!LdrAddRefDll",offset="6",inst="ret    "}]
(gdb) 
<-data-disassemble -s 2089937836 -e 2089938031 -- 1>
^done,asm_insns=[{address="0x7c91ebac",func-name="ntdll!RtlRandomEx",offset="0",inst="push   %ebp"},{address="0x7c91ebad",func-name="ntdll!RtlRandomEx",offset="1",inst="mov    %esp,%ebp"},{address="0x7c91ebaf",func-name="ntdll!RtlRandomEx",offset="3",inst="pushf  "},{address="0x7c91ebb0",func-name="ntdll!RtlRandomEx",offset="4",inst="sub    $0x2d0,%esp"},{address="0x7c91ebb6",func-name="ntdll!RtlRandomEx",offset="10",inst="mov    %eax,-0x224(%ebp)"},{address="0x7c91ebbc",func-name="ntdll!RtlRandomEx",offset="16",inst="mov    %ecx,-0x228(%ebp)"},{address="0x7c91ebc2",func-name="ntdll!RtlRandomEx",offset="22",inst="mov    0x8(%ebp),%eax"},{address="0x7c91ebc5",func-name="ntdll!RtlRandomEx",offset="25",inst="mov    0x4(%ebp),%ecx"},{address="0x7c91ebc8",func-name="ntdll!RtlRandomEx",offset="28",inst="mov    %ecx,0xc(%eax)"},{address="0x7c91ebcb",func-name="ntdll!RtlRandomEx",offset="31",inst="lea    -0x2d4(%ebp),%eax"},{address="0x7c91ebd1",func-name="ntdll!RtlRandomEx",offset="37",inst="mov    %ecx,0xb8(%eax)"},{address="0x7c91ebd7",func-name="ntdll!RtlRandomEx",offset="43",inst="mov    %ebx,0xa4(%eax)"},{address="0x7c91ebdd",func-name="ntdll!RtlRandomEx",offset="49",inst="mov    %edx,0xa8(%eax)"},{address="0x7c91ebe3",func-name="ntdll!RtlRandomEx",offset="55",inst="mov    %esi,0xa0(%eax)"},{address="0x7c91ebe9",func-name="ntdll!RtlRandomEx",offset="61",inst="mov    %edi,0x9c(%eax)"},{address="0x7c91ebef",func-name="ntdll!RtlRandomEx",offset="67",inst="lea    0xc(%ebp),%ecx"},{address="0x7c91ebf2",func-name="ntdll!RtlRandomEx",offset="70",inst="mov    %ecx,0xc4(%eax)"},{address="0x7c91ebf8",func-name="ntdll!RtlRandomEx",offset="76",inst="mov    0x0(%ebp),%ecx"},{address="0x7c91ebfb",func-name="ntdll!RtlRandomEx",offset="79",inst="mov    %ecx,0xb4(%eax)"},{address="0x7c91ec01",func-name="ntdll!RtlRandomEx",offset="85",inst="mov    -0x4(%ebp),%ecx"},{address="0x7c91ec04",func-name="ntdll!RtlRandomEx",offset="88",inst="mov    %ecx,0xc0(%eax)"},{address="0x7c91ec0a",func-name="ntdll!RtlRandomEx",offset="94",inst="mov    %cs,0xbc(%eax)"},{address="0x7c91ec10",func-name="ntdll!RtlRandomEx",offset="100",inst="mov    %ds,0x98(%eax)"},{address="0x7c91ec16",func-name="ntdll!RtlRandomEx",offset="106",inst="mov    %es,0x94(%eax)"},{address="0x7c91ec1c",func-name="ntdll!RtlRandomEx",offset="112",inst="mov    %fs,0x90(%eax)"},{address="0x7c91ec22",func-name="ntdll!RtlRandomEx",offset="118",inst="mov    %gs,0x8c(%eax)"},{address="0x7c91ec28",func-name="ntdll!RtlRandomEx",offset="124",inst="mov    %ss,0xc8(%eax)"},{address="0x7c91ec2e",func-name="ntdll!RtlRandomEx",offset="130",inst="movl   $0x10007,(%eax)"},{address="0x7c91ec34",func-name="ntdll!RtlRandomEx",offset="136",inst="push   $0x1"},{address="0x7c91ec36",func-name="ntdll!RtlRandomEx",offset="138",inst="push   %eax"},{address="0x7c91ec37",func-name="ntdll!RtlRandomEx",offset="139",inst="pushl  0x8(%ebp)"},{address="0x7c91ec3a",func-name="ntdll!RtlRandomEx",offset="142",inst="call   0x7c91e252 <ntdll!ZwRaiseException>"},{address="0x7c91ec3f",func-name="ntdll!RtlRandomEx",offset="147",inst="sub    $0x20,%esp"},{address="0x7c91ec42",func-name="ntdll!RtlRandomEx",offset="150",inst="mov    %eax,(%esp)"},{address="0x7c91ec45",func-name="ntdll!RtlRandomEx",offset="153",inst="movl   $0x1,0x4(%esp)"},{address="0x7c91ec4d",func-name="ntdll!RtlRandomEx",offset="161",inst="movl   $0x0,0x10(%esp)"},{address="0x7c91ec55",func-name="ntdll!RtlRandomEx",offset="169",inst="mov    0x8(%ebp),%eax"},{address="0x7c91ec58",func-name="ntdll!RtlRandomEx",offset="172",inst="mov    %eax,0x8(%esp)"},{address="0x7c91ec5c",func-name="ntdll!RtlRandomEx",offset="176",inst="mov    %esp,%eax"},{address="0x7c91ec5e",func-name="ntdll!RtlRandomEx",offset="178",inst="push   %eax"},{address="0x7c91ec5f",func-name="ntdll!RtlRandomEx",offset="179",inst="call   0x7c91ebac <ntdll!RtlRandomEx>"},{address="0x7c91ec64",func-name="ntdll!RtlRandomEx",offset="184",inst="int3   "},{address="0x7c91ec65",func-name="ntdll!RtlRandomEx",offset="185",inst="int3   "},{address="0x7c91ec66",func-name="ntdll!RtlRandomEx",offset="186",inst="int3   "},{address="0x7c91ec67",func-name="ntdll!RtlRandomEx",offset="187",inst="int3   "},{address="0x7c91ec68",func-name="ntdll!RtlRandomEx",offset="188",inst="int3   "},{address="0x7c91ec69",func-name="ntdll!RtlRandomEx",offset="189",inst="int3   "},{address="0x7c91ec6a",func-name="ntdll!RtlRandomEx",offset="190",inst="nop"},{address="0x7c91ec6b",func-name="ntdll!RtlRandomEx",offset="191",inst="nop"},{address="0x7c91ec6c",func-name="ntdll!RtlRandomEx",offset="192",inst="nop"},{address="0x7c91ec6d",func-name="ntdll!RtlRandomEx",offset="193",inst="nop"},{address="0x7c91ec6e",func-name="ntdll!RtlRandomEx",offset="194",inst="nop"}]
(gdb) 
<-data-read-memory 2089937725 x 1 1 311>
^done,addr="0x7c91eb3d",nr-bytes="311",total-bytes="311",next-row="0x7c91ec74",prev-row="0x7c91ea06",next-page="0x7c91ec74",prev-page="0x7c91ea06",memory=[{addr="0x7c91eb3d",data=["0x55","0x8b","0xec","0x83","0xec","0x50","0x89","0x44","0x24","0x0c","0x64","0xa1","0x18","0x00","0x00","0x00","0x8b","0x80","0xa4","0x01","0x00","0x00","0x89","0x04","0x24","0xc7","0x44","0x24","0x04","0x00","0x00","0x00","0x00","0xc7","0x44","0x24","0x08","0x00","0x00","0x00","0x00","0xc7","0x44","0x24","0x10","0x00","0x00","0x00","0x00","0x54","0xe8","0x38","0x00","0x00","0x00","0x8b","0x04","0x24","0x8b","0xe5","0x5d","0xc3","0x90","0x8d","0xa4","0x24","0x00","0x00","0x00","0x00","0x8d","0x49","0x00","0x90","0x90","0x90","0x90","0x90","0x8b","0xd4","0x0f","0x34","0x90","0x90","0x90","0x90","0x90","0xc3","0x8d","0xa4","0x24","0x00","0x00","0x00","0x00","0x8d","0x64","0x24","0x00","0x90","0x90","0x90","0x90","0x90","0x8d","0x54","0x24","0x08","0xcd","0x2e","0xc3","0x55","0x8b","0xec","0x9c","0x81","0xec","0xd0","0x02","0x00","0x00","0x89","0x85","0xdc","0xfd","0xff","0xff","0x89","0x8d","0xd8","0xfd","0xff","0xff","0x8b","0x45","0x08","0x8b","0x4d","0x04","0x89","0x48","0x0c","0x8d","0x85","0x2c","0xfd","0xff","0xff","0x89","0x88","0xb8","0x00","0x00","0x00","0x89","0x98","0xa4","0x00","0x00","0x00","0x89","0x90","0xa8","0x00","0x00","0x00","0x89","0xb0","0xa0","0x00","0x00","0x00","0x89","0xb8","0x9c","0x00","0x00","0x00","0x8d","0x4d","0x0c","0x89","0x88","0xc4","0x00","0x00","0x00","0x8b","0x4d","0x00","0x89","0x88","0xb4","0x00","0x00","0x00","0x8b","0x4d","0xfc","0x89","0x88","0xc0","0x00","0x00","0x00","0x8c","0x88","0xbc","0x00","0x00","0x00","0x8c","0x98","0x98","0x00","0x00","0x00","0x8c","0x80","0x94","0x00","0x00","0x00","0x8c","0xa0","0x90","0x00","0x00","0x00","0x8c","0xa8","0x8c","0x00","0x00","0x00","0x8c","0x90","0xc8","0x00","0x00","0x00","0xc7","0x00","0x07","0x00","0x01","0x00","0x6a","0x01","0x50","0xff","0x75","0x08","0xe8","0x13","0xf6","0xff","0xff","0x83","0xec","0x20","0x89","0x04","0x24","0xc7","0x44","0x24","0x04","0x01","0x00","0x00","0x00","0xc7","0x44","0x24","0x10","0x00","0x00","0x00","0x00","0x8b","0x45","0x08","0x89","0x44","0x24","0x08","0x8b","0xc4","0x50","0xe8","0x48","0xff","0xff","0xff","0xcc","0xcc","0xcc","0xcc","0xcc","0xcc","0x90","0x90","0x90","0x90","0x90","0x8b","0x4c","0x24","0x08","0x57"]}]
(gdb) 
<-stack-info-depth>
^done,depth="5"
(gdb) 
<ptype pchar(p1)>
&"ptype pchar(p1)\n"
&"No symbol \"p1\" in current context.\n"
^error,msg="No symbol \"p1\" in current context."
(gdb) 
<ptype pchar>
&"ptype pchar\n"
~"type = ^Char\n"
^done
(gdb) 
<-data-evaluate-expression parentfp>
^error,msg="No symbol \"parentfp\" in current context."
(gdb) 
<-thread-info>
^done,threads=[{id="2",target-id="Thread 4624.0x1ac8",frame={level="0",addr="0x7c911231",func="ntdll!DbgUiConnectToDbg",args=[],from="C:\\WINDOWS\\system32\\ntdll.dll"},state="stopped"},{id="1",target-id="Thread 4624.0xeec",frame={level="0",addr="0x7c91eb94",func="ntdll!LdrAccessResource",args=[],from="C:\\WINDOWS\\system32\\ntdll.dll"},state="stopped"}],current-thread-id="1"
(gdb) 
<-stack-list-arguments 1 0 4>
^done,stack-args=[frame={level="0",args=[]},frame={level="1",args=[]},frame={level="2",args=[]},frame={level="3",args=[]},frame={level="4",args=[]}]
(gdb) 
<-stack-list-frames 0 4>
^done,stack=[frame={level="0",addr="0x7c91eb94",func="ntdll!LdrAccessResource",from="C:\\WINDOWS\\system32\\ntdll.dll"},frame={level="1",addr="0x7c91e3ed",func="ntdll!ZwRequestWaitReplyPort",from="C:\\WINDOWS\\system32\\ntdll.dll"},frame={level="2",addr="0x7c9232f8",func="ntdll!CsrProbeForWrite",from="C:\\WINDOWS\\system32\\ntdll.dll"},frame={level="3",addr="0x7c871921",func="KERNEL32!GetConsoleInputWaitHandle",from="C:\\WINDOWS\\system32\\kernel32.dll"},frame={level="4",addr="0x00000000",func="??"}]
(gdb) 
<-stack-list-arguments 1 0 0>
^done,stack-args=[frame={level="0",args=[]}]
(gdb) 
<-stack-list-locals 1>
^done,locals=[]
(gdb) 
<info line C:\Documents and Settings\Ludo\Mes documents\Lazarus Projects\test\BufDataSet\contest.pas:144>
&"info line C:\\Documents and Settings\\Ludo\\Mes documents\\Lazarus Projects\\test\\BufDataSet\\contest.pas:144\n"
&"Function \"C:\\Documents and Settings\\Ludo\\Mes documents\\Lazarus Projects\\test\\BufDataSet\\contest.pas:144\" not defined.\n"
^error,msg="Function \"C:\\Documents and Settings\\Ludo\\Mes documents\\Lazarus Projects\\test\\BufDataSet\\contest.pas:144\" not defined."
(gdb) 
pause_set_breakpoint.log (33,860 bytes)   

2011-09-18 19:33

 

run_no_breakpoints.log (14,624 bytes)   
<-file-exec-and-symbols "C:/Documents and Settings/Ludo/Mes documents/Lazarus Projects/test/BufDataSet/contest.exe">
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<-environment-cd .>
^done
(gdb) 
<-environment-cd "C:/Documents and Settings/Ludo/Mes documents/Lazarus Projects/test/BufDataSet/">
^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"
~"0x00402160  SYSTEM_FPC_CPUINIT\n"
^done
(gdb) 
<-exec-arguments >
^done
(gdb) 
<set width 50000>
&"set width 50000\n"
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<info address main>
&"info address main\n"
~"Symbol \"main\" is a function at address 0x4016c0.\n"
^done
(gdb) 
<-break-insert -t *4200128>
^done,bkpt={number="8",type="breakpoint",disp="del",enabled="y",addr="0x004016c0",func="main",file="contest.pas",fullname="c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.pas",line="105",times="0",original-location="*4200128"}
(gdb) 
<ptype TObject>
&"ptype TObject\n"
~"type = ^TOBJECT = class \n"
~"  public\n"
~"    function  CREATE () : TOBJECT;\n"
~"    procedure DESTROY (); virtual;\n"
~"    function  NEWINSTANCE () : TOBJECT; virtual;\n"
~"    procedure FREEINSTANCE (); virtual;\n"
~"    function  SAFECALLEXCEPTION () : HRESULT; virtual;\n"
~"    procedure DEFAULTHANDLER (); virtual;\n"
~"    procedure FREE ();\n"
~"    function  INITINSTANCE () : TOBJECT;\n"
~"    procedure CLEANUPINSTANCE ();\n"
~"    function  CLASSTYPE () : TCLASS;\n"
~"    function  CLASSINFO () : POINTER;\n"
~"    function  CLASSNAME () : SHORTSTRING;\n"
~"    function  CLASSNAMEIS () : BOOLEAN;\n"
~"    function  CLASSPARENT () : TCLASS;\n"
~"    function  INSTANCESIZE () : LONGINT;\n"
~"    function  INHERITSFROM () : BOOLEAN;\n"
~"    function  STRINGMESSAGETABLE () : PSTRINGMESSAGETABLE;\n"
~"    function  METHODADDRESS () : POINTER;\n"
~"    function  METHODNAME () : SHORTSTRING;\n"
~"    function  FIELDADDRESS () : POINTER;\n"
~"    procedure AFTERCONSTRUCTION (); virtual;\n"
~"    procedure BEFOREDESTRUCTION (); virtual;\n"
~"    procedure DEFAULTHANDLERSTR (); virtual;\n"
~"    procedure DISPATCH (); virtual;\n"
~"    procedure DISPATCHSTR (); virtual;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACEBYSTR () : BOOLEAN;\n"
~"    function  GETINTERFACEWEAK () : BOOLEAN;\n"
~"    function  GETINTERFACEENTRY () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACEENTRYBYSTR () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACETABLE () : PINTERFACETABLE;\n"
~"    function  UNITNAME () : ANSISTRING;\n"
~"    function  EQUALS () : BOOLEAN; virtual;\n"
~"    function  GETHASHCODE () : LONGINT; virtual;\n"
~"    function  TOSTRING () : ANSISTRING; virtual;\n"
~"end\n"
^done
(gdb) 
<ptype Exception>
&"ptype Exception\n"
~"type = ^EXCEPTION = class : public TOBJECT \n"
~"  private\n"
~"    FMESSAGE : ANSISTRING;\n"
~"    FHELPCONTEXT : LONGINT;\n"
~"    HELPCONTEXT : LONGINT;\n"
~"    MESSAGE : ANSISTRING;\n"
~"\n"
~"  public\n"
~"    function  CREATE () : EXCEPTION;\n"
~"    function  CREATEFMT () : EXCEPTION;\n"
~"    function  CREATERES () : EXCEPTION;\n"
~"    function  CREATERESFMT () : EXCEPTION;\n"
~"    function  CREATEHELP () : EXCEPTION;\n"
~"    function  CREATEFMTHELP () : EXCEPTION;\n"
~"    function  CREATERESHELP () : EXCEPTION;\n"
~"    function  CREATERESFMTHELP () : EXCEPTION;\n"
~"end\n"
^done
(gdb) 
<ptype Shortstring>
&"ptype Shortstring\n"
~"type = ShortString = record \n"
~"    length : BYTE;\n"
~"    st : array [0..-1] of CHAR;\n"
~"end\n"
^done
(gdb) 
<ptype pointer>
&"ptype pointer\n"
~"type = ^pointer\n"
^done
(gdb) 
<ptype byte>
&"ptype byte\n"
~"type = BYTE\n"
^done
(gdb) 
<info address FPC_RAISEEXCEPTION>
&"info address FPC_RAISEEXCEPTION\n"
~"Symbol \"FPC_RAISEEXCEPTION\" is at 0x409590 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4232592>
^done,bkpt={number="9",type="breakpoint",disp="keep",enabled="y",addr="0x00409590",at="<fpc_raiseexception>",times="0",original-location="*4232592"}
(gdb) 
<info address FPC_BREAK_ERROR>
&"info address FPC_BREAK_ERROR\n"
~"Symbol \"FPC_BREAK_ERROR\" is at 0x40abb0 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4238256>
^done,bkpt={number="10",type="breakpoint",disp="keep",enabled="y",addr="0x0040abb0",at="<SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",times="0",original-location="*4238256"}
(gdb) 
<info address FPC_RUNERROR>
&"info address FPC_RUNERROR\n"
~"Symbol \"FPC_RUNERROR\" is at 0x40ac90 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4238480>
^done,bkpt={number="11",type="breakpoint",disp="keep",enabled="y",addr="0x0040ac90",at="<SYSTEM_RUNERROR$WORD>",times="0",original-location="*4238480"}
(gdb) 
<info file>
&"info file\n"
~"Symbols from \"c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.exe\".\n"
~"Local exec file:\n"
~"\t`c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.exe', file type pei-i386.\n"
~"\tEntry point: 0x440c50\n"
~"\t0x00401000 - 0x00440c90 is .text\n"
~"\t0x00441000 - 0x0044b7dc is .data\n"
~"\t0x0044c000 - 0x00450a74 is .bss\n"
~"\t0x00452000 - 0x00452c54 is .idata\n"
^done
(gdb) 
<-data-evaluate-expression sizeof(POINTER)>
^done,value="4"
(gdb) 
<-break-insert -f foo>
&"Function \"foo\" not defined.\n"
^done,bkpt={number="12",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="foo",times="0",original-location="foo"}
(gdb) 
<-break-delete 12>
^done
(gdb) 
<-exec-run>
=thread-group-started,id="i1",pid="5776"
=thread-created,id="1",group-id="i1"
~"[New Thread 5776.0x1a0]\n"
^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",target-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",host-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\imagehlp.dll",target-name="C:\\WINDOWS\\system32\\imagehlp.dll",host-name="C:\\WINDOWS\\system32\\imagehlp.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\oleaut32.dll",target-name="C:\\WINDOWS\\system32\\oleaut32.dll",host-name="C:\\WINDOWS\\system32\\oleaut32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\ole32.dll",target-name="C:\\WINDOWS\\system32\\ole32.dll",host-name="C:\\WINDOWS\\system32\\ole32.dll",symbols-loaded="0",thread-group="i1"
*stopped,reason="breakpoint-hit",disp="del",bkptno="8",frame={addr="0x004016c0",func="main",args=[],file="contest.pas",fullname="c:\\documents and settings\\ludo\\mes documents\\lazarus projects\\test\\bufdataset\\contest.pas",line="105"},thread-id="1",stopped-threads="all"
(gdb) 
<info program>
&"info program\n"
~"\tUsing the running image of child Thread 5776.0x1a0.\n"
~"Program stopped at 0x4016c0.\n"
~"It stopped at a breakpoint that has since been deleted.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
^done
(gdb) 
<-symbol-list-lines C:\Documents and Settings\Ludo\Mes documents\Lazarus Projects\test\BufDataSet\contest.pas>
^error,msg="-symbol-list-lines: Usage: SOURCE_FILENAME"
(gdb) 
<-symbol-list-lines contest.pas>
^done,lines=[{pc="0x00000000",line="0"},{pc="0x004016c0",line="105"},{pc="0x004016ce",line="120"},{pc="0x004016d8",line="121"},{pc="0x004016e7",line="122"},{pc="0x004016f6",line="123"},{pc="0x00401705",line="124"},{pc="0x00401714",line="125"},{pc="0x00401723",line="126"},{pc="0x00401732",line="127"},{pc="0x00401741",line="143"},{pc="0x00401750",line="144"},{pc="0x0040175f",line="145"},{pc="0x0040176e",line="146"},{pc="0x0040177f",line="147"},{pc="0x00401789",line="0"},{pc="0x00401795",line="0"},{pc="0x004017a5",line="0"}]
(gdb) 
<-exec-continue>
^running
*running,thread-id="all"
(gdb) 
*stopped,reason="breakpoint-hit",disp="keep",bkptno="10",frame={addr="0x0040abb0",func="SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER",args=[]},thread-id="1",stopped-threads="all"
(gdb) 
<-data-evaluate-expression $eax>
^done,value="131"
(gdb) 
<-data-evaluate-expression $edx>
^done,value="4267329"
(gdb) 
<-data-evaluate-expression $ecx>
^done,value="22803912"
(gdb) 
<-stack-info-depth>
^done,depth="5"
(gdb) 
<-stack-select-frame 0>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5a8"
(gdb) 
<-stack-select-frame 1>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5ac"
(gdb) 
<-stack-select-frame 2>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5b0"
(gdb) 
<-stack-select-frame 3>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5b4"
(gdb) 
<-stack-select-frame 4>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5b8"
(gdb) 
<-stack-select-frame 0>
^done
(gdb) 
<info line * POINTER(4267329)>
&"info line * POINTER(4267329)\n"
~"No line number information available for address 0x411d41 <LNFODWRF_SEEK$INT64+49>\n"
^done
(gdb) 
<-exec-continue>
^running
*running,thread-id="1"
(gdb) 
*stopped,reason="breakpoint-hit",disp="keep",bkptno="9",frame={addr="0x00409590",func="fpc_raiseexception",args=[]},thread-id="1",stopped-threads="all"
(gdb) 
<-data-evaluate-expression ^^shortstring(^POINTER($eax)^+12)^^>
^done,value="'Exception'"
(gdb) 
<x/s Exception($eax).FMessage>
&"x/s Exception($eax).FMessage\n"
~"0x0:\t <Address 0x0 out of bounds>"
~"\n"
^done
(gdb) 
<-data-evaluate-expression $edx>
^done,value="4267329"
(gdb) 
<-data-evaluate-expression $ecx>
^done,value="22803912"
(gdb) 
<-stack-info-depth>
^done,depth="20"
(gdb) 
<-stack-select-frame 0>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf574"
(gdb) 
<-stack-select-frame 1>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf594"
(gdb) 
<-stack-select-frame 2>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf598"
(gdb) 
<-stack-select-frame 3>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5c0"
(gdb) 
<-stack-select-frame 4>
^done
(gdb) 
<-data-evaluate-expression $fp>
^done,value="0x15bf5c8"
(gdb) 
<-stack-list-frames 4 4>
^done,stack=[frame={level="4",addr="0x00411d41",func="LNFODWRF_SEEK$INT64"}]
(gdb) 
<info line * POINTER(4267329)>
&"info line * POINTER(4267329)\n"
~"No line number information available for address 0x411d41 <LNFODWRF_SEEK$INT64+49>\n"
^done
(gdb) 
<-exec-continue>
^running
*running,thread-id="1"
(gdb) 
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1",exit-code="0331"
*stopped,reason="exited",exit-code="0331"
(gdb) 
<-stack-list-frames 0 0>
^error,msg="No registers."
(gdb) 
<-break-delete 9>
^done
(gdb) 
<-break-delete 10>
^done
(gdb) 
<-break-delete 11>
^done
(gdb) 
<-file-exec-and-symbols >
=library-unloaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",thread-group="i1"
=library-unloaded,id="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",target-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",host-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\imagehlp.dll",target-name="C:\\WINDOWS\\system32\\imagehlp.dll",host-name="C:\\WINDOWS\\system32\\imagehlp.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\oleaut32.dll",target-name="C:\\WINDOWS\\system32\\oleaut32.dll",host-name="C:\\WINDOWS\\system32\\oleaut32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\ole32.dll",target-name="C:\\WINDOWS\\system32\\ole32.dll",host-name="C:\\WINDOWS\\system32\\ole32.dll",thread-group="i1"
^done
(gdb) 
run_no_breakpoints.log (14,624 bytes)   

2011-09-18 19:41

 

run_no_breakpoints_b.log (11,298 bytes)   
<-file-exec-and-symbols "B:/project1.exe">
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<-environment-cd .>
^done
(gdb) 
<-environment-cd "B:/">
^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"
~"0x00402140  SYSTEM_FPC_CPUINIT\n"
^done
(gdb) 
<-exec-arguments >
^done
(gdb) 
<set width 50000>
&"set width 50000\n"
^done
(gdb) 
<-gdb-set language pascal>
^done
(gdb) 
<info address main>
&"info address main\n"
~"Symbol \"main\" is a function at address 0x4016a0.\n"
^done
(gdb) 
<-break-insert -t *4200096>
^done,bkpt={number="37",type="breakpoint",disp="del",enabled="y",addr="0x004016a0",func="main",file="contest.pas",fullname="b:\\contest.pas",line="105",times="0",original-location="*4200096"}
(gdb) 
<ptype TObject>
&"ptype TObject\n"
~"type = ^TOBJECT = class \n"
~"  public\n"
~"    function  CREATE () : TOBJECT;\n"
~"    procedure DESTROY (); virtual;\n"
~"    function  NEWINSTANCE () : TOBJECT; virtual;\n"
~"    procedure FREEINSTANCE (); virtual;\n"
~"    function  SAFECALLEXCEPTION () : HRESULT; virtual;\n"
~"    procedure DEFAULTHANDLER (); virtual;\n"
~"    procedure FREE ();\n"
~"    function  INITINSTANCE () : TOBJECT;\n"
~"    procedure CLEANUPINSTANCE ();\n"
~"    function  CLASSTYPE () : TCLASS;\n"
~"    function  CLASSINFO () : POINTER;\n"
~"    function  CLASSNAME () : SHORTSTRING;\n"
~"    function  CLASSNAMEIS () : BOOLEAN;\n"
~"    function  CLASSPARENT () : TCLASS;\n"
~"    function  INSTANCESIZE () : LONGINT;\n"
~"    function  INHERITSFROM () : BOOLEAN;\n"
~"    function  STRINGMESSAGETABLE () : PSTRINGMESSAGETABLE;\n"
~"    function  METHODADDRESS () : POINTER;\n"
~"    function  METHODNAME () : SHORTSTRING;\n"
~"    function  FIELDADDRESS () : POINTER;\n"
~"    procedure AFTERCONSTRUCTION (); virtual;\n"
~"    procedure BEFOREDESTRUCTION (); virtual;\n"
~"    procedure DEFAULTHANDLERSTR (); virtual;\n"
~"    procedure DISPATCH (); virtual;\n"
~"    procedure DISPATCHSTR (); virtual;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACE () : BOOLEAN;\n"
~"    function  GETINTERFACEBYSTR () : BOOLEAN;\n"
~"    function  GETINTERFACEWEAK () : BOOLEAN;\n"
~"    function  GETINTERFACEENTRY () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACEENTRYBYSTR () : PINTERFACEENTRY;\n"
~"    function  GETINTERFACETABLE () : PINTERFACETABLE;\n"
~"    function  UNITNAME () : ANSISTRING;\n"
~"    function  EQUALS () : BOOLEAN; virtual;\n"
~"    function  GETHASHCODE () : LONGINT; virtual;\n"
~"    function  TOSTRING () : ANSISTRING; virtual;\n"
~"end\n"
^done
(gdb) 
<ptype Exception>
&"ptype Exception\n"
~"type = ^EXCEPTION = class : public TOBJECT \n"
~"  private\n"
~"    FMESSAGE : ANSISTRING;\n"
~"    FHELPCONTEXT : LONGINT;\n"
~"    HELPCONTEXT : LONGINT;\n"
~"    MESSAGE : ANSISTRING;\n"
~"\n"
~"  public\n"
~"    function  CREATE () : EXCEPTION;\n"
~"    function  CREATEFMT () : EXCEPTION;\n"
~"    function  CREATERES () : EXCEPTION;\n"
~"    function  CREATERESFMT () : EXCEPTION;\n"
~"    function  CREATEHELP () : EXCEPTION;\n"
~"    function  CREATEFMTHELP () : EXCEPTION;\n"
~"    function  CREATERESHELP () : EXCEPTION;\n"
~"    function  CREATERESFMTHELP () : EXCEPTION;\n"
~"end\n"
^done
(gdb) 
<ptype Shortstring>
&"ptype Shortstring\n"
~"type = ShortString = record \n"
~"    length : BYTE;\n"
~"    st : array [0..-1] of CHAR;\n"
~"end\n"
^done
(gdb) 
<ptype pointer>
&"ptype pointer\n"
~"type = ^pointer\n"
^done
(gdb) 
<ptype byte>
&"ptype byte\n"
~"type = BYTE\n"
^done
(gdb) 
<info address FPC_RAISEEXCEPTION>
&"info address FPC_RAISEEXCEPTION\n"
~"Symbol \"FPC_RAISEEXCEPTION\" is at 0x4093b0 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4232112>
^done,bkpt={number="38",type="breakpoint",disp="keep",enabled="y",addr="0x004093b0",at="<fpc_raiseexception>",times="0",original-location="*4232112"}
(gdb) 
<info address FPC_BREAK_ERROR>
&"info address FPC_BREAK_ERROR\n"
~"Symbol \"FPC_BREAK_ERROR\" is at 0x40a9d0 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4237776>
^done,bkpt={number="39",type="breakpoint",disp="keep",enabled="y",addr="0x0040a9d0",at="<SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",times="0",original-location="*4237776"}
(gdb) 
<info address FPC_RUNERROR>
&"info address FPC_RUNERROR\n"
~"Symbol \"FPC_RUNERROR\" is at 0x40aab0 in a file compiled without debugging.\n"
^done
(gdb) 
<-break-insert *4238000>
^done,bkpt={number="40",type="breakpoint",disp="keep",enabled="y",addr="0x0040aab0",at="<SYSTEM_RUNERROR$WORD>",times="0",original-location="*4238000"}
(gdb) 
<info file>
&"info file\n"
~"Symbols from \"b:\\project1.exe\".\n"
~"Local exec file:\n"
~"\t`b:\\project1.exe', file type pei-i386.\n"
~"\tEntry point: 0x43e4b0\n"
~"\t0x00401000 - 0x0043e4f0 is .text\n"
~"\t0x0043f000 - 0x0044929c is .data\n"
~"\t0x0044a000 - 0x0044e374 is .bss\n"
~"\t0x00450000 - 0x00450c0c is .idata\n"
^done
(gdb) 
<-data-evaluate-expression sizeof(POINTER)>
^done,value="4"
(gdb) 
<-break-insert -f foo>
&"Function \"foo\" not defined.\n"
^done,bkpt={number="41",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="foo",times="0",original-location="foo"}
(gdb) 
<-break-delete 41>
^done
(gdb) 
<-exec-run>
=thread-group-started,id="i1",pid="7440"
=thread-created,id="1",group-id="i1"
~"[New Thread 7440.0xf68]\n"
^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",target-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",host-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\imagehlp.dll",target-name="C:\\WINDOWS\\system32\\imagehlp.dll",host-name="C:\\WINDOWS\\system32\\imagehlp.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\oleaut32.dll",target-name="C:\\WINDOWS\\system32\\oleaut32.dll",host-name="C:\\WINDOWS\\system32\\oleaut32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",symbols-loaded="0",thread-group="i1"
=library-loaded,id="C:\\WINDOWS\\system32\\ole32.dll",target-name="C:\\WINDOWS\\system32\\ole32.dll",host-name="C:\\WINDOWS\\system32\\ole32.dll",symbols-loaded="0",thread-group="i1"
*stopped,reason="breakpoint-hit",disp="del",bkptno="37",frame={addr="0x004016a0",func="main",args=[],file="contest.pas",fullname="b:\\contest.pas",line="105"},thread-id="1",stopped-threads="all"
(gdb) 
<info program>
&"info program\n"
~"\tUsing the running image of child Thread 7440.0xf68.\n"
~"Program stopped at 0x4016a0.\n"
~"It stopped at a breakpoint that has since been deleted.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n"
^done
(gdb) 
<-symbol-list-lines B:\contest.pas>
^done,lines=[{pc="0x00000000",line="0"},{pc="0x004016a0",line="105"},{pc="0x004016ae",line="120"},{pc="0x004016b8",line="121"},{pc="0x004016c7",line="122"},{pc="0x004016d6",line="123"},{pc="0x004016e5",line="124"},{pc="0x004016f4",line="125"},{pc="0x00401703",line="126"},{pc="0x00401712",line="127"},{pc="0x00401721",line="143"},{pc="0x00401730",line="144"},{pc="0x0040173f",line="145"},{pc="0x0040174e",line="146"},{pc="0x0040175f",line="147"},{pc="0x00401769",line="0"},{pc="0x00401775",line="0"},{pc="0x00401785",line="0"}]
(gdb) 
<-exec-continue>
^running
*running,thread-id="all"
(gdb) 
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1",exit-code="0"
*stopped,reason="exited-normally"
(gdb) 
<-stack-list-frames 0 0>
^error,msg="No registers."
(gdb) 
<-break-delete 38>
^done
(gdb) 
<-break-delete 39>
^done
(gdb) 
<-break-delete 40>
^done
(gdb) 
<-file-exec-and-symbols >
=library-unloaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",thread-group="i1"
=library-unloaded,id="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",target-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",host-name="C:\\Program Files\\Alwil Software\\Avast5\\snxhk.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\imagehlp.dll",target-name="C:\\WINDOWS\\system32\\imagehlp.dll",host-name="C:\\WINDOWS\\system32\\imagehlp.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\oleaut32.dll",target-name="C:\\WINDOWS\\system32\\oleaut32.dll",host-name="C:\\WINDOWS\\system32\\oleaut32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",thread-group="i1"
=library-unloaded,id="C:\\WINDOWS\\system32\\ole32.dll",target-name="C:\\WINDOWS\\system32\\ole32.dll",host-name="C:\\WINDOWS\\system32\\ole32.dll",thread-group="i1"
^done
(gdb) 
run_no_breakpoints_b.log (11,298 bytes)   

Ludo Brands

2011-09-18 20:43

developer   ~0051995

The exception can easily be reproduced with the following program:
program Project1;

var p:pointer;
begin
  getmem(p,5);
end.

Compile with -gw2 -gl -gh. The exception occurs only when there is a leak.
This is probably unrelated to the fix in 32405. I'll investigate further and probably raise another issue for this.

Martin Friebe

2011-09-18 20:43

manager   ~0051996

please test again.

Ludo Brands

2011-09-18 21:39

developer   ~0051997

out of unit breaks are solved.

I'll file a new issue for the dwarf/heaptrc crash.

Issue History

Date Modified Username Field Change
2011-09-15 19:38 Ludo Brands New Issue
2011-09-15 19:38 Ludo Brands Status new => assigned
2011-09-15 19:38 Ludo Brands Assigned To => Marc Weustink
2011-09-15 19:38 Ludo Brands Widgetset => Win32/Win64
2011-09-17 22:39 Martin Friebe Note Added: 0051967
2011-09-17 22:40 Martin Friebe Assigned To Marc Weustink => Martin Friebe
2011-09-18 12:16 Ludo Brands Note Added: 0051974
2011-09-18 12:50 Martin Friebe Note Added: 0051975
2011-09-18 14:26 Ludo Brands Note Added: 0051978
2011-09-18 14:43 Ludo Brands Note Edited: 0051978
2011-09-18 16:10 Martin Friebe Fixed in Revision => 32405
2011-09-18 16:10 Martin Friebe LazTarget => 0.99.0
2011-09-18 16:10 Martin Friebe Status assigned => resolved
2011-09-18 16:10 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2011-09-18 16:10 Martin Friebe Resolution open => fixed
2011-09-18 16:10 Martin Friebe Note Added: 0051984
2011-09-18 16:10 Martin Friebe Target Version => 0.99.0
2011-09-18 17:09 Ludo Brands Status resolved => assigned
2011-09-18 17:09 Ludo Brands Resolution fixed => reopened
2011-09-18 17:09 Ludo Brands Note Added: 0051986
2011-09-18 18:30 Martin Friebe Note Added: 0051988
2011-09-18 18:31 Martin Friebe Note Edited: 0051988
2011-09-18 18:50 Martin Friebe Note Edited: 0051988
2011-09-18 19:32 Ludo Brands Note Added: 0051991
2011-09-18 19:32 Ludo Brands File Added: pause_set_breakpoint.log
2011-09-18 19:33 Ludo Brands File Added: run_no_breakpoints.log
2011-09-18 19:33 Ludo Brands Note Edited: 0051991
2011-09-18 19:41 Ludo Brands File Added: run_no_breakpoints_b.log
2011-09-18 19:44 Ludo Brands Note Edited: 0051991
2011-09-18 19:50 Ludo Brands Note Edited: 0051991
2011-09-18 20:43 Ludo Brands Note Added: 0051995
2011-09-18 20:43 Martin Friebe Fixed in Revision 32405 => 32410
2011-09-18 20:43 Martin Friebe Status assigned => resolved
2011-09-18 20:43 Martin Friebe Resolution reopened => fixed
2011-09-18 20:43 Martin Friebe Note Added: 0051996
2011-09-18 21:39 Ludo Brands Status resolved => closed
2011-09-18 21:39 Ludo Brands Note Added: 0051997