GDB Bugs & Laz trunk: good experience with gdb 7.5.91 lazarus / 12-Debugger ---------------------------------------------------------------------- BigChimp · 2013-04-01 07:01 Downloaded GNU gdb (GDB) 7.5.91.20130328-cvs from the drangon site http://www.drangon.org/mingw/mirror.php?num=2&fname=mingw-w32-bin- i686-20130329.7z and used it with Laz trunk x86 on Windows. It seems to break where it should and I noticed that bug http://sourceware.org/bugzilla/show_bug.cgi?id=15102 is fixed: Code: [Select]d:\Cop\t>fpcdev -gw Array.pas Free Pascal Compiler version 2.7.1 [2013/04/01] for i386 Copyright (c) 1993-2013 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling Array.pas Array.pas(3,5) Note: Local variable "a" is assigned but never used Linking Array.exe 5 lines compiled, 0.1 sec, 26608 bytes code, 1204 bytes data 1 note(s) issued d:\Cop\t>gdb GNU gdb (GDB) 7.5.91.20130328-cvs Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "i686-w64-mingw32". For bug reporting instructions, please see: . (gdb) ptype TByteArray No symbol table is loaded.  Use the "file" command. (gdb) file Array.exe Reading symbols from d:\Cop\t\Array.exe...done. (gdb) ptype TByteArray type = array [0..191] of SMALLINT FYI: ran the test case in gdb bug 14018; bug still seems present: Code: [Select]d:\Cop\t>gdb -i mi test.exe =thread-group-added,id="i1" ~"GNU gdb (GDB) 7.5.91.20130328-cvs\n" ~"Copyright (C) 2013 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later \ 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 wa rranty\" for details.\n" ~"This GDB was configured as \"i686-w64-mingw32\".\nFor bug reporting instructio ns, please see:\n" ~"...\n" ~"Reading symbols from d:\\Cop\\t\\test.exe..." ~"done.\n" (gdb) break-insert test.pas:4 &"break-insert test.pas:4\n" &"Undefined command: \"break-insert\".  Try \"help\".\n" ^error,msg="Undefined command: \"break-insert\".  Try \"help\"." (gdb) -break-insert test.pas:4 ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr= "0x004013f 9",func="FOO",file="test.pas",fullname="d:\\Cop\\t\\test.pas",line="4" ,thread-gr oups=["i1"],times="0",original-location="test.pas:4"} (gdb) -exec-run =thread-group-started,id="i1",pid="4924" =thread-created,id="1",group-id="i1" ~"[New Thread 4924.0x13e8]\n" ^running *running,thread-id="all" (gdb) &"warning: Can not parse XML library list; XML support was disabled at compile t ime\n" =breakpoint- modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x004013f9",func="FOO",file="test.pas",fullname="d:\\\\Cop\\\\t\ \\\test.pa s",line="4",thread-groups=["i1"],times="1",original- location="test.pas:4"} *stopped,reason="breakpoint- hit",disp="keep",bkptno="1",frame={addr="0x004013f9" ,func="FOO",args=[],file="test.pas",fullname="d:\\Cop\\t\\test.pas",li ne="4"},th read-id="1",stopped-threads="all" (gdb) -exec-continue ^running *running,thread-id="1" (gdb) =thread-created,id="2",group-id="i1" ~"[New Thread 4924.0x428]\n" *running,thread-id="all" 1 1 ~"[Switching to Thread 4924.0x428]\n" *stopped,reason="signal-received",signal-name="SIGTRAP",signal- meaning="Trace/br eakpoint trap",frame={addr="0x773f0005",func="??",args=[]},thread- id="2",stopped -threads="all" =thread-selected,id="2" (gdb) -exec-continue ^running *running,thread-id="all" (gdb) =breakpoint- modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x004013f9",func="FOO",file="test.pas",fullname="d:\\\\Cop\\\\t\ \\\test.pa s",line="4",thread-groups=["i1"],times="2",original- location="test.pas:4"} ~"[Switching to Thread 4924.0x13e8]\n" &"warning: SuspendThread failed. (winerr 5)\n" ^error,msg="PC register is not available" =thread-selected,id="1" (gdb) -exec-continue ^error,msg="PC register is not available" (gdb) ---------------------------------------------------------------------- BigChimp · 2013-04-04 14:21 Mmm well, now I can't debug anymore (breakpoints not hit at all). Perhaps due to the dwarf writer bug http://bugs.freepascal.org/view.php?id=20296 ... who knows. Going to give it a rest and write some bug-free software so I don't need to use the debugger