GDB - lets make D support awesome

Jerry jlquinn at optonline.net
Wed Nov 27 12:17:54 PST 2013


"Iain Buclaw" <ibuclaw at ubuntu.com> writes:

> Hi,
>
> I've created a gdb fork on github and will be giving d-lang support some love
> - with the intention of pushing patches back to gdb development as soon as
> possible.  The bulk of the work will be done over the next fortnight, but for
> some other work (see buglink) will take a couple more months to roll out as
> changes on both gdb and compilers need to be aligned up.
>
> https://d.puremagic.com/issues/show_bug.cgi?id=9800
>
>
> If anybody is interesting in helping out.  Would be great to get people
> developing, testing, and sending suggestions for features/fixes on it.
> Especially users of dmd/ldc to jump on board to ensure that changes done don't
> break the existing support that you may have.

Hi Ian,  Here's a first bug.

 I'm on Ubuntu 12.10 x86_64.  Debugging isn't stepping through the code.
Here's a simple example.  This is with dmd 2.064.2 and a fresh clone of
your git repo.

junk2.d:
import std.stdio;

void main(string args[]) {
    string ss = "hi there";
    writeln(ss);
}

jlquinn at wyvern:~/mtd/tokenizer$ ~/dmd2/linux/bin64/dmd -g junk2.d
jlquinn at wyvern:~/mtd/tokenizer$ ~/d/bin/gdb junk2
GNU gdb (GDB) 7.6.50.20131118-cvs
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-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from junk2...done.
(gdb) b main
Breakpoint 1 at 0x4266a0
(gdb) run
Starting program: /home/jlquinn/mtd/tokenizer/junk2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, 0x00000000004266a0 in main ()
(gdb) s
Single stepping until exit from function main,
which has no line number information.
hi there
0x00007ffff760eea5 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) show configuration
This GDB was configured as follows:
   configure --host=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/home/jlquinn/d/share/gdb (relocatable)
             --with-jit-reader-dir=/home/jlquinn/d/lib/gdb (relocatable)
             --without-libunwind-ia64
             --without-lzma
             --with-python=/usr
             --with-separate-debug-dir=/home/jlquinn/d/lib/debug (relocatable)
             --with-zlib
             --without-babeltrace

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)


More information about the Digitalmars-d mailing list