November 27, 2013
"Iain Buclaw" <ibuclaw@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@wyvern:~/mtd/tokenizer$ ~/dmd2/linux/bin64/dmd -g junk2.d
jlquinn@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.)
November 27, 2013
On 27 November 2013 20:17, Jerry <jlquinn@optonline.net> wrote:
> "Iain Buclaw" <ibuclaw@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);
> }
>

Hi Jerry,

I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the development branch if you want gdb to work properly).

For dmd, someone needs to fix dmd to work with gdb-7.6.
November 27, 2013
Iain Buclaw <ibuclaw@gdcproject.org> writes:

> On 27 November 2013 20:17, Jerry <jlquinn@optonline.net> wrote:
>> 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);
>> }
>>
>
> Hi Jerry,
>
> I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the development branch if you want gdb to work properly).
>
> For dmd, someone needs to fix dmd to work with gdb-7.6.

FWIW, I had the same problem with gdb 7.5 installed on my system.  I'll build gdc-4.8 and see how I do.

Thanks
November 27, 2013
On 11/27/13 1:56 PM, Iain Buclaw wrote:
> On 27 November 2013 20:17, Jerry <jlquinn@optonline.net> wrote:
>> "Iain Buclaw" <ibuclaw@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);
>> }
>>
>
> Hi Jerry,
>
> I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is
> compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the
> development branch if you want gdb to work properly).
>
> For dmd, someone needs to fix dmd to work with gdb-7.6.
>

This level of if this then thating with versions is pretty painful.  It's something we've got to get past somehow (yeah, there's a chicken/egg issue).  It's this sort of area where things don't "just work" that puts off developers.
November 28, 2013
On 27 November 2013 23:15, Brad Roberts <braddr@puremagic.com> wrote:
> On 11/27/13 1:56 PM, Iain Buclaw wrote:
>>
>> On 27 November 2013 20:17, Jerry <jlquinn@optonline.net> wrote:
>>>
>>> "Iain Buclaw" <ibuclaw@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);
>>> }
>>>
>>
>> Hi Jerry,
>>
>> I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the development branch if you want gdb to work properly).
>>
>> For dmd, someone needs to fix dmd to work with gdb-7.6.
>>
>
> This level of if this then thating with versions is pretty painful.  It's something we've got to get past somehow (yeah, there's a chicken/egg issue). It's this sort of area where things don't "just work" that puts off developers.

Actually, I might have got it backwards.  :o)

gdc-4.8 is not compatible with gdb-7.5, but gdb-7.6 should be backwards compatible, knock on wood.


Jerry - have you tested debugging with -gc ?
December 02, 2013
Iain Buclaw <ibuclaw@gdcproject.org> writes:

> On 27 November 2013 23:15, Brad Roberts <braddr@puremagic.com> wrote:
>> On 11/27/13 1:56 PM, Iain Buclaw wrote:
>>>
>>> On 27 November 2013 20:17, Jerry <jlquinn@optonline.net> wrote:
>>>> 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);
>>>> }
>>>>
>>>
>>> Hi Jerry,
>>>
>>> I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the development branch if you want gdb to work properly).
>>>
>>> For dmd, someone needs to fix dmd to work with gdb-7.6.
>>>
>>
>> This level of if this then thating with versions is pretty painful.  It's something we've got to get past somehow (yeah, there's a chicken/egg issue). It's this sort of area where things don't "just work" that puts off developers.
>
> Actually, I might have got it backwards.  :o)
>
> gdc-4.8 is not compatible with gdb-7.5, but gdb-7.6 should be backwards compatible, knock on wood.
>
>
> Jerry - have you tested debugging with -gc ?

I tried with -gc and with -gc -g and get the same inability to find the frame base with dmd.  I'll build gdc 48 tonight and try it.
December 03, 2013
> Jerry - have you tested debugging with -gc ?

-gc shouldn't be needed any longer.
December 03, 2013
> I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is
> compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the
> development branch if you want gdb to work properly).
>
> For dmd, someone needs to fix dmd to work with gdb-7.6.

How is that? Did they drop support for DWARF2?
Do we have a bug report for this?
December 03, 2013
On 3 December 2013 00:53, Martin Nowak <code@dawg.eu> wrote:
>> I believe dmd is only compatible with gdb 7.5.  Likewise gdc-4.7 is compatible with 7.5, but not 7.6 (you should use gdc-4.8 or the development branch if you want gdb to work properly).
>>
>> For dmd, someone needs to fix dmd to work with gdb-7.6.
>
>
> How is that? Did they drop support for DWARF2?
> Do we have a bug report for this?

Things are never dropped in GCC - only moved into a switch!  :o)

In GCC-4.8, DWARF4 became the default when generating DWARF debug information. Before GCC-4.8 the default used was DWARF2.  Also GDB-7.5 has DWARF4 support, I think the problem is either because distributors turn this support off, or it is not as complete as in GDB-7.6.

For clarification (incase anyone is interested) for all platforms except Darwin, -g will default to the following being turned on:

-gdwarf-4 -fno-debug-types-section

For Darwin, the old behaviour of GCC-4.7 is still the case:

-gdwarf-2 -gstrict-dwarf

But at last check, you guys separated out debugging for each platform, so you can keep the dwarf debugging as-is in the machobj generation.


I don't think there is a bug report, but we can make one that says "DMD doesn't support DWARF4 (elfobj.c)"
1 2
Next ›   Last »