View Issue Details

IDProjectCategoryView StatusLast Update
0024722FPCCompilerpublic2016-11-13 22:59
ReporterAndrew Brunner Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformAMD 8 Core x64 LinuxOSUbuntu x64 
Fixed in Version3.0.0 
Summary0024722: Cannot debug app compiled under GDB
DescriptionFor whatever reason the latest version of FPC from source does not allow for debugging.

Steps To ReproduceUpdate to latest version.
Set breakpoint (in lazarus) and run program.
Additional InformationI reverted back to FPC 2.6.2 binaries, rebuilt lazarus, and the problem does not occur.
TagsNo tags attached.
Fixed in Revision25282
FPCOldBugId
FPCTarget
Attached Files

Relationships

has duplicate 0024765 resolvedJonas Maebe FPC "Dwarf Error: Could not find abbrev number X" since probably rev 25054 
related to 0024760 resolvedMartin Friebe Lazarus Debugger not working, popup error 
related to 0024729 closedMartin Friebe Lazarus When evaluating watches, Lazarus randomly forces debugger to stop. 

Activities

Jonas Maebe

2013-07-10 11:21

manager   ~0068784

We need much more information:
a) which version of gdb are you using?
b) does it work with the command line gdb? (i.e., is it a bug in FPC or in Lazarus' gdb integration combined with the kind of debug information that is generated by FPC trunk)
c) does it only fail with LCL applications, or with any application?
d) what are the compiler options you are using? (in particular, are you using smart linking?)
e) what is the actual problem that you are seeing? Do not assume that whatever you see when you "Set breakpoint (in lazarus) and run program." will be exactly the same as what other people will see.

Additionally, please include whatever output that may help with diagnosing the problem, such as Lazarus' debug console. I don't know how to access it because I never use Lazarus for debugging, but I know Martin Friebe regularly shows the details of the communication between gdb and Lazarus. If you don't know how to access it either, use the command line version of gdb instead and post its output (or ask on the Lazarus list).

The information you provided is sufficient for a message on the mailing list asking whether other people also have problems or so, but not for a bug report.

FWIW, debugging works fine for me with gdb 7.0.1 and 7.4 on Scientific Linux 5.5 (x86-64) with a trunk compiler.

Jonas Maebe

2013-07-10 15:54

manager   ~0068789

I can reproduce it now. Florian, it's caused by r25054, this change:

Index: dbgdwarf.pas
===================================================================
--- dbgdwarf.pas (revision 25053)
+++ dbgdwarf.pas (revision 25054)
@@ -2383,7 +2383,7 @@
                     else
                       begin
                         templist.concat(tai_const.create_8bit(ord(DW_OP_addr)));
- templist.concat(tai_const.createname(sym.mangledname,offset));
+ templist.concat(tai_const.Create_type_name(offsetabstype,sym.mangledname,offset));
                         blocksize:=1+sizeof(puint);
                       end;
                   end;

And probably also the other place where you replace a createname() call with a create_type_name() call (around line 2848).

"offsetabstype" refers to offsets used to refer to DWARF entities, not to the width of the pointer size of the target (and hence the size of pointers). It's only 64 bit if the DWARF debug info itself can be bigger than 2GB (or maybe 4GB), which we currently never support (it's also only possible with DWARF 3 and higher). As a result, the addresses of the global variables are now cut off to 32 bit on 64 bit targets.

E.g. in aasmbase on 64 bit targets:

# Symbol ASMLABELTYPEPREFIX
    .uleb128 2
    .ascii "ASMLABELTYPEPREFIX\000"
    .byte 1
    .byte 9
    .byte 3
    .quad TC_AASMBASE_ASMLABELTYPEPREFIX
    .quad _$AASMBASE$_Ld10

now becomes

# Symbol ASMLABELTYPEPREFIX
    .uleb128 2
    .ascii "ASMLABELTYPEPREFIX\000"
    .byte 1
    .byte 9
    .byte 3
    .long TC_$AASMBASE_$$_ASMLABELTYPEPREFIX
    .quad _$AASMBASE$_Ld6

(the next to last entry changed from .quad to .long)

Andrew Brunner

2013-07-10 18:32

reporter   ~0068792

From lazarus, all I do is set a breakpoint in the project's createform statement (line 1 or so). Still not working.

=thread-group-added,id="i1"
(gdb)
<-gdb-set confirm off>
^done
(gdb)
<-gdb-set new-console off>
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<set width 50000>
&"set width 50000\n"
=cmd-param-changed,param="width",value="50000"
^done
(gdb)
<-gdb-version>
~"GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu\n"
~"Copyright (C) 2013 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-linux-gnu\".\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
^done
(gdb)
<-gdb-set env COLORTERM=gnome-terminal>
^done
(gdb)
<-gdb-set env COMPIZ_BIN_PATH=/usr/bin/>
^done
(gdb)
<-gdb-set env COMPIZ_CONFIG_PROFILE=ubuntu>
^done
(gdb)
<-gdb-set env DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-0XUTtOdi63,guid=7240f9cbe21afc508ab0860e51dd8600>
^done
(gdb)
<-gdb-set env DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path>
^done
(gdb)
<-gdb-set env DESKTOP_SESSION=ubuntu>
^done
(gdb)
<-gdb-set env _=/Developer/Lazarus/startlazarus>
^done
(gdb)
<-gdb-set env DISPLAY=:0>
^done
(gdb)
<-gdb-set env GDMSESSION=ubuntu>
^done
(gdb)
<-gdb-set env GNOME_DESKTOP_SESSION_ID=this-is-deprecated>
^done
(gdb)
<-gdb-set env GNOME_KEYRING_CONTROL=/run/user/atbrunner/keyring-ENmkVU>
^done
(gdb)
<-gdb-set env GNOME_KEYRING_PID=16034>
^done
(gdb)
<-gdb-set env GPG_AGENT_INFO=/run/user/atbrunner/keyring-ENmkVU/gpg:0:1>
^done
(gdb)
<-gdb-set env GTK_MODULES=overlay-scrollbar>
^done
(gdb)
<-gdb-set env HOME=/home/atbrunner>
^done
(gdb)
<-gdb-set env LANG=en_US.UTF-8>
^done
(gdb)
<-gdb-set env LESSCLOSE=/usr/bin/lesspipe %s %s>
^done
(gdb)
<-gdb-set env LESSOPEN=| /usr/bin/lesspipe %s>
^done
(gdb)
<-gdb-set env LIBOVERLAY_SCROLLBAR=0>
^done
(gdb)
<-gdb-set env LOGNAME=atbrunner>
^done
(gdb)
<-gdb-set env LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:>
^done
(gdb)
<-gdb-set env MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path>
^done
(gdb)
<-gdb-set env PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games>
^done
(gdb)
<-gdb-set env PWD=/Developer>
^done
(gdb)
<-gdb-set env SESSION_MANAGER=local/datahouse:@/tmp/.ICE-unix/16045,unix/datahouse:/tmp/.ICE-unix/16045>
^done
(gdb)
<-gdb-set env SHELL=/bin/bash>
^done
(gdb)
<-gdb-set env SHLVL=2>
^done
(gdb)
<-gdb-set env SSH_AGENT_PID=16091>
^done
(gdb)
<-gdb-set env SSH_AUTH_SOCK=/run/user/atbrunner/keyring-ENmkVU/ssh>
^done
(gdb)
<-gdb-set env TERM=xterm>
^done
(gdb)
<-gdb-set env TEXTDOMAINDIR=/usr/share/locale/>
^done
(gdb)
<-gdb-set env TEXTDOMAIN=im-config>
^done
(gdb)
<-gdb-set env UBUNTU_MENUPROXY=libappmenu.so>
^done
(gdb)
<-gdb-set env USER=atbrunner>
^done
(gdb)
<-gdb-set env WINDOWID=39845893>
^done
(gdb)
<-gdb-set env XAUTHORITY=/home/atbrunner/.Xauthority>
^done
(gdb)
<-gdb-set env XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg>
^done
(gdb)
<-gdb-set env XDG_CURRENT_DESKTOP=Unity>
^done
(gdb)
<-gdb-set env XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/>
^done
(gdb)
<-gdb-set env XDG_RUNTIME_DIR=/run/user/atbrunner>
^done
(gdb)
<-gdb-set env XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0>
^done
(gdb)
<-gdb-set env XDG_SESSION_COOKIE=b04433de88ab0593f4d261fc50c375aa-1373472256.639424-1076727138>
^done
(gdb)
<-gdb-set env XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1>
^done
(gdb)
<-file-exec-and-symbols "/tmp/project1">
&"Dwarf Error: Could not find abbrev number 84 [in module /tmp/project1]\n"
^done
(gdb)
<-environment-cd .>
^done
(gdb)
<-environment-cd "/tmp/">
^done
(gdb)
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<info functions FPC_CPUINIT>
&"info functions FPC_CPUINIT\n"
~"All functions matching regular expression \"FPC_CPUINIT\":\n"
~"\nNon-debugging symbols:\n"
~"0x000000000044a830 SYSTEM_$$_FPC_CPUINIT\n"
^done
(gdb)
<-exec-arguments >
=cmd-param-changed,param="args",value=""
^done
(gdb)
<set inferior-tty /dev/pts/2>
&"set inferior-tty /dev/pts/2\n"
=cmd-param-changed,param="inferior-tty",value="/dev/pts/2"
^done
(gdb)
<-gdb-set language pascal>
^done
(gdb)
<ptype TObject>
&"ptype TObject\n"
&"No symbol table is loaded. Use the \"file\" command.\n"
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<ptype Exception>
&"ptype Exception\n"
&"No symbol table is loaded. Use the \"file\" command.\n"
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<ptype Shortstring>
&"ptype Shortstring\n"
&"No symbol table is loaded. Use the \"file\" command.\n"
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<ptype pointer>
&"ptype pointer\n"
&"No symbol table is loaded. Use the \"file\" command.\n"
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<ptype byte>
&"ptype byte\n"
&"No symbol table is loaded. Use the \"file\" command.\n"
^error,msg="No symbol table is loaded. Use the \"file\" command."
(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 \"/tmp/project1\".\n"
~"Local exec file:\n"
~"\t`/tmp/project1', file type elf64-x86-64.\n"
~"\tEntry point: 0x448db0\n"
~"\t0x00000000004001c8 - 0x00000000004001e4 is .interp\n"
~"\t0x00000000004001e4 - 0x0000000000400204 is .note.ABI-tag\n"
~"\t0x0000000000400208 - 0x0000000000405680 is .hash\n"
~"\t0x0000000000405680 - 0x00000000004190a8 is .dynsym\n"
~"\t0x00000000004190a8 - 0x000000000042ecf3 is .dynstr\n"
~"\t0x000000000042ecf4 - 0x0000000000430722 is .gnu.version\n"
~"\t0x0000000000430728 - 0x0000000000430788 is .gnu.version_r\n"
~"\t0x0000000000430788 - 0x000000000043ced8 is .rela.dyn\n"
~"\t0x000000000043ced8 - 0x0000000000444150 is .rela.plt\n"
~"\t0x0000000000444150 - 0x0000000000448db0 is .plt\n"
~"\t0x0000000000448db0 - 0x0000000000780f50 is .text\n"
~"\t0x0000000000780f50 - 0x00000000007ce9d0 is .rodata\n"
~"\t0x00000000007ce9d0 - 0x00000000007ce9d4 is .eh_frame\n"
~"\t0x00000000009cf000 - 0x00000000009cf008 is .init_array\n"
~"\t0x00000000009cf008 - 0x00000000009cf010 is .fini_array\n"
~"\t0x00000000009cf010 - 0x00000000009cf018 is .jcr\n"
~"\t0x00000000009cf018 - 0x00000000009cf298 is .dynamic\n"
~"\t0x00000000009cf298 - 0x00000000009d34f0 is .got\n"
~"\t0x00000000009d34f0 - 0x00000000009d5b30 is .got.plt\n"
~"\t0x00000000009d5b30 - 0x0000000000b4b4b8 is .data\n"
~"\t0x0000000000b4b4b8 - 0x0000000000b6e140 is fpc.resources\n"
~"\t0x0000000000b6e140 - 0x0000000000b895e8 is .bss\n"
~"\t0x0000000000b895e8 - 0x0000000000b89640 is fpc.reshandles\n"
^done
(gdb)
<-data-evaluate-expression sizeof(^char)>
^error,msg="A syntax error in expression, near `char)'."
(gdb)
<-break-insert -f foo>
&"Function \"foo\" not defined.\n"
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="foo",times="0",original-location="foo"}
(gdb)
<-break-delete 1>
^done
(gdb)
<-break-insert main>
^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000448f14",at="<main+4>",thread-groups=["i1"],times="0",original-location="main"}
(gdb)
<-break-insert +0>
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<-break-insert *4492720>
^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000448db0",at="<_start>",thread-groups=["i1"],times="0",original-location="*4492720"}
(gdb)
<-exec-run>
=thread-group-started,id="i1",pid="24599"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb)
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
&"warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000\n"
=library-loaded,id="/lib/x86_64-linux-gnu/libdl.so.2",target-name="/lib/x86_64-linux-gnu/libdl.so.2",host-name="/lib/x86_64-linux-gnu/libdl.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libpthread.so.0",target-name="/lib/x86_64-linux-gnu/libpthread.so.0",host-name="/lib/x86_64-linux-gnu/libpthread.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libX11.so.6",target-name="/usr/lib/x86_64-linux-gnu/libX11.so.6",host-name="/usr/lib/x86_64-linux-gnu/libX11.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libglib-2.0.so.0",target-name="/lib/x86_64-linux-gnu/libglib-2.0.so.0",host-name="/lib/x86_64-linux-gnu/libglib-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libcairo.so.2",target-name="/usr/lib/x86_64-linux-gnu/libcairo.so.2",host-name="/usr/lib/x86_64-linux-gnu/libcairo.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libatk-1.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libatk-1.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libatk-1.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libxcb.so.1",target-name="/usr/lib/x86_64-linux-gnu/libxcb.so.1",host-name="/usr/lib/x86_64-linux-gnu/libxcb.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libm.so.6",target-name="/lib/x86_64-linux-gnu/libm.so.6",host-name="/lib/x86_64-linux-gnu/libm.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXfixes.so.3",target-name="/usr/lib/x86_64-linux-gnu/libXfixes.so.3",host-name="/usr/lib/x86_64-linux-gnu/libXfixes.so.3",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libfontconfig.so.1",target-name="/usr/lib/x86_64-linux-gnu/libfontconfig.so.1",host-name="/usr/lib/x86_64-linux-gnu/libfontconfig.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXrender.so.1",target-name="/usr/lib/x86_64-linux-gnu/libXrender.so.1",host-name="/usr/lib/x86_64-linux-gnu/libXrender.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXinerama.so.1",target-name="/usr/lib/x86_64-linux-gnu/libXinerama.so.1",host-name="/usr/lib/x86_64-linux-gnu/libXinerama.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXi.so.6",target-name="/usr/lib/x86_64-linux-gnu/libXi.so.6",host-name="/usr/lib/x86_64-linux-gnu/libXi.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXrandr.so.2",target-name="/usr/lib/x86_64-linux-gnu/libXrandr.so.2",host-name="/usr/lib/x86_64-linux-gnu/libXrandr.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXcursor.so.1",target-name="/usr/lib/x86_64-linux-gnu/libXcursor.so.1",host-name="/usr/lib/x86_64-linux-gnu/libXcursor.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXcomposite.so.1",target-name="/usr/lib/x86_64-linux-gnu/libXcomposite.so.1",host-name="/usr/lib/x86_64-linux-gnu/libXcomposite.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXdamage.so.1",target-name="/usr/lib/x86_64-linux-gnu/libXdamage.so.1",host-name="/usr/lib/x86_64-linux-gnu/libXdamage.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXext.so.6",target-name="/usr/lib/x86_64-linux-gnu/libXext.so.6",host-name="/usr/lib/x86_64-linux-gnu/libXext.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libffi.so.6",target-name="/usr/lib/x86_64-linux-gnu/libffi.so.6",host-name="/usr/lib/x86_64-linux-gnu/libffi.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libpcre.so.3",target-name="/lib/x86_64-linux-gnu/libpcre.so.3",host-name="/lib/x86_64-linux-gnu/libpcre.so.3",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libpixman-1.so.0",target-name="/usr/lib/x86_64-linux-gnu/libpixman-1.so.0",host-name="/usr/lib/x86_64-linux-gnu/libpixman-1.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libfreetype.so.6",target-name="/usr/lib/x86_64-linux-gnu/libfreetype.so.6",host-name="/usr/lib/x86_64-linux-gnu/libfreetype.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libpng12.so.0",target-name="/lib/x86_64-linux-gnu/libpng12.so.0",host-name="/lib/x86_64-linux-gnu/libpng12.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0",target-name="/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0",host-name="/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libxcb-render.so.0",target-name="/usr/lib/x86_64-linux-gnu/libxcb-render.so.0",host-name="/usr/lib/x86_64-linux-gnu/libxcb-render.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libz.so.1",target-name="/lib/x86_64-linux-gnu/libz.so.1",host-name="/lib/x86_64-linux-gnu/libz.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/librt.so.1",target-name="/lib/x86_64-linux-gnu/librt.so.1",host-name="/lib/x86_64-linux-gnu/librt.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXau.so.6",target-name="/usr/lib/x86_64-linux-gnu/libXau.so.6",host-name="/usr/lib/x86_64-linux-gnu/libXau.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libXdmcp.so.6",target-name="/usr/lib/x86_64-linux-gnu/libXdmcp.so.6",host-name="/usr/lib/x86_64-linux-gnu/libXdmcp.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libselinux.so.1",target-name="/lib/x86_64-linux-gnu/libselinux.so.1",host-name="/lib/x86_64-linux-gnu/libselinux.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libresolv.so.2",target-name="/lib/x86_64-linux-gnu/libresolv.so.2",host-name="/lib/x86_64-linux-gnu/libresolv.so.2",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0",target-name="/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0",host-name="/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libexpat.so.1",target-name="/lib/x86_64-linux-gnu/libexpat.so.1",host-name="/lib/x86_64-linux-gnu/libexpat.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libicule.so.48",target-name="/usr/lib/x86_64-linux-gnu/libicule.so.48",host-name="/usr/lib/x86_64-linux-gnu/libicule.so.48",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libicuuc.so.48",target-name="/usr/lib/x86_64-linux-gnu/libicuuc.so.48",host-name="/usr/lib/x86_64-linux-gnu/libicuuc.so.48",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",target-name="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",host-name="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libgcc_s.so.1",target-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",host-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libicudata.so.48",target-name="/usr/lib/x86_64-linux-gnu/libicudata.so.48",host-name="/usr/lib/x86_64-linux-gnu/libicudata.so.48",symbols-loaded="0",thread-group="i1"
~"[Thread debugging using libthread_db enabled]\n"
~"Using host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\n"
=breakpoint-modified,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000448db0",at="<_start>",thread-groups=["i1"],times="1",original-location="*4492720"}
*stopped,reason="breakpoint-hit",disp="keep",bkptno="3",frame={addr="0x0000000000448db0",func="_start",args=[]},thread-id="1",stopped-threads="all",core="0"
(gdb)
<-break-delete 2>
^done
(gdb)
<-break-delete 3>
^done
(gdb)
<info address FPC_RAISEEXCEPTION>
&"info address FPC_RAISEEXCEPTION\n"
~"Symbol \"FPC_RAISEEXCEPTION\" is at 0x45c4a0 in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert *4572320>
^done,bkpt={number="4",type="breakpoint",disp="keep",enabled="y",addr="0x000000000045c4a0",at="<fpc_raiseexception>",thread-groups=["i1"],times="0",original-location="*4572320"}
(gdb)
<info address FPC_BREAK_ERROR>
&"info address FPC_BREAK_ERROR\n"
~"Symbol \"FPC_BREAK_ERROR\" is at 0x460600 in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert *4589056>
^done,bkpt={number="5",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000460600",at="<SYSTEM_$$_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER>",thread-groups=["i1"],times="0",original-location="*4589056"}
(gdb)
<info address FPC_RUNERROR>
&"info address FPC_RUNERROR\n"
~"Symbol \"FPC_RUNERROR\" is at 0x460780 in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert *4589440>
^done,bkpt={number="6",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000460780",at="<SYSTEM_$$_RUNERROR$WORD>",thread-groups=["i1"],times="0",original-location="*4589440"}
(gdb)
<-symbol-list-lines project1.lpr>
^error,msg="-symbol-list-lines: Unknown source file name."
(gdb)
<info line "project1.lpr":16>
&"info line \"project1.lpr\":16\n"
&"No symbol table is loaded. Use the \"file\" command.\n"
^error,msg="No symbol table is loaded. Use the \"file\" command."
(gdb)
<-break-insert -f project1.lpr:16>
&"No symbol table is loaded. Use the \"file\" command.\n"
^done,bkpt={number="7",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="project1.lpr:16",times="0",original-location="project1.lpr:16"}
(gdb)
<-break-enable 7>
^done
(gdb)
<-exec-continue>
^running
*running,thread-id="all"
(gdb)
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so",target-name="/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so",host-name="/usr/lib/x86_64-linux-gnu/gconv/UTF-16.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so",target-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so",host-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so",target-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so",host-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so",target-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so",host-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libcanberra-gtk.so.0",target-name="/usr/lib/x86_64-linux-gnu/libcanberra-gtk.so.0",host-name="/usr/lib/x86_64-linux-gnu/libcanberra-gtk.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libcanberra.so.0",target-name="/usr/lib/x86_64-linux-gnu/libcanberra.so.0",host-name="/usr/lib/x86_64-linux-gnu/libcanberra.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3",target-name="/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3",host-name="/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libtdb.so.1",target-name="/usr/lib/x86_64-linux-gnu/libtdb.so.1",host-name="/usr/lib/x86_64-linux-gnu/libtdb.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libltdl.so.7",target-name="/usr/lib/x86_64-linux-gnu/libltdl.so.7",host-name="/usr/lib/x86_64-linux-gnu/libltdl.so.7",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libvorbis.so.0",target-name="/usr/lib/x86_64-linux-gnu/libvorbis.so.0",host-name="/usr/lib/x86_64-linux-gnu/libvorbis.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libogg.so.0",target-name="/usr/lib/x86_64-linux-gnu/libogg.so.0",host-name="/usr/lib/x86_64-linux-gnu/libogg.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxies/libappmenu.so",target-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxies/libappmenu.so",host-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxies/libappmenu.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libdbusmenu-gtk.so.4",target-name="/usr/lib/x86_64-linux-gnu/libdbusmenu-gtk.so.4",host-name="/usr/lib/x86_64-linux-gnu/libdbusmenu-gtk.so.4",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libdbusmenu-glib.so.4",target-name="/usr/lib/x86_64-linux-gnu/libdbusmenu-glib.so.4",host-name="/usr/lib/x86_64-linux-gnu/libdbusmenu-glib.so.4",symbols-loaded="0",thread-group="i1"
=thread-created,id="2",group-id="i1"
~"[New Thread 0x7fffed711700 (LWP 24603)]\n"
*running,thread-id="all"
=thread-created,id="3",group-id="i1"
~"[New Thread 0x7fffecf10700 (LWP 24604)]\n"
*running,thread-id="all"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/pango/1.8.0/modules/pango-basic-fc.so",target-name="/usr/lib/x86_64-linux-gnu/pango/1.8.0/modules/pango-basic-fc.so",host-name="/usr/lib/x86_64-linux-gnu/pango/1.8.0/modules/pango-basic-fc.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so",target-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so",host-name="/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libibus-1.0.so.0",target-name="/usr/lib/x86_64-linux-gnu/libibus-1.0.so.0",host-name="/usr/lib/x86_64-linux-gnu/libibus-1.0.so.0",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so",target-name="/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so",host-name="/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so",target-name="/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so",host-name="/usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libudev.so.1",target-name="/lib/x86_64-linux-gnu/libudev.so.1",host-name="/lib/x86_64-linux-gnu/libudev.so.1",symbols-loaded="0",thread-group="i1"

Andrew Brunner

2013-07-10 18:33

reporter   ~0068793

GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)

Andrew Brunner

2013-07-10 18:36

reporter   ~0068794

@Jonas, this is a critical problem for me, all my software is based off of trunk. I can't use 2.6.2 for production... It does not support my deep nested classes / types.

Jonas Maebe

2013-07-11 09:11

manager   ~0068802

You should be able to use r25053 until this is fixed.

Andrew Brunner

2013-07-11 14:09

reporter   ~0068804

Last edited: 2013-07-11 14:10

View 2 revisions

Thanks. r25053 works with debugging!

Cyrax

2013-07-23 15:49

reporter  

dbgdwarf.pas.patch (1,048 bytes)   
Index: compiler/dbgdwarf.pas
===================================================================
--- compiler/dbgdwarf.pas	(revision 25159)
+++ compiler/dbgdwarf.pas	(working copy)
@@ -2383,7 +2383,7 @@
                     else
                       begin
                         templist.concat(tai_const.create_8bit(ord(DW_OP_addr)));
-                        templist.concat(tai_const.Create_type_name(offsetabstype,sym.mangledname,offset));
+                        templist.concat(tai_const.Create_type_name(aitconst_ptr,sym.mangledname,offset));
                         blocksize:=1+sizeof(puint);
                       end;
                   end;
@@ -2844,7 +2844,7 @@
           toasm :
             begin
               templist.concat(tai_const.create_8bit(3));
-              templist.concat(tai_const.create_type_name(offsetabstype,sym.mangledname,0));
+              templist.concat(tai_const.create_type_name(aitconst_ptr,sym.mangledname,0));
               blocksize:=1+sizeof(puint);
             end;
           tovar:
dbgdwarf.pas.patch (1,048 bytes)   

Cyrax

2013-07-23 15:50

reporter   ~0069038

Attached patch (dbgdwarf.pas.patch) which should fix this bug.

Andrew Brunner

2013-08-01 03:42

reporter   ~0069188

Thanks Cyrax. This did the trick for me!

Reinier Olislagers

2013-08-01 09:54

developer   ~0069193

Patch works nicely for win64 laz trunk: breakpoints work again at least in a small test.
win x86 still shows the "program bla has stopped working" when starting debuggin, which may be caused by other/earlier changes in the code.

Suggest if posible: implementing this patch/something like it.

Florian

2013-08-18 18:06

administrator   ~0069436

I've applied the patch, you are right, r25054 was partially wrong.

Issue History

Date Modified Username Field Change
2013-07-10 02:01 Andrew Brunner New Issue
2013-07-10 11:21 Jonas Maebe Note Added: 0068784
2013-07-10 11:21 Jonas Maebe Status new => resolved
2013-07-10 11:21 Jonas Maebe Resolution open => unable to reproduce
2013-07-10 11:21 Jonas Maebe Assigned To => Jonas Maebe
2013-07-10 15:48 Jonas Maebe Assigned To Jonas Maebe => Florian Klämpfl
2013-07-10 15:48 Jonas Maebe Status resolved => assigned
2013-07-10 15:54 Jonas Maebe Note Added: 0068789
2013-07-10 18:32 Andrew Brunner Note Added: 0068792
2013-07-10 18:33 Andrew Brunner Note Added: 0068793
2013-07-10 18:36 Andrew Brunner Note Added: 0068794
2013-07-11 09:11 Jonas Maebe Note Added: 0068802
2013-07-11 14:09 Andrew Brunner Note Added: 0068804
2013-07-11 14:10 Andrew Brunner Note Edited: 0068804 View Revisions
2013-07-19 09:49 Jonas Maebe Relationship added has duplicate 0024765
2013-07-22 22:49 Martin Friebe Relationship added related to 0024760
2013-07-22 23:53 Martin Friebe Relationship added related to 0024729
2013-07-23 15:49 Cyrax File Added: dbgdwarf.pas.patch
2013-07-23 15:50 Cyrax Note Added: 0069038
2013-08-01 03:42 Andrew Brunner Note Added: 0069188
2013-08-01 09:54 Reinier Olislagers Note Added: 0069193
2013-08-18 18:06 Florian Fixed in Revision => 25282
2013-08-18 18:06 Florian Note Added: 0069436
2013-08-18 18:06 Florian Status assigned => resolved
2013-08-18 18:06 Florian Fixed in Version => 2.7.1
2013-08-18 18:06 Florian Resolution unable to reproduce => fixed
2013-08-18 18:06 Florian Assigned To Florian Klämpfl => Florian
2013-09-01 18:18 Andrew Brunner Status resolved => closed