May 02, 2010
On 02/05/10 20:33, Jason House wrote:
> Maybe I'm just cursed with getting gdb to work with D :(  I've tried the plain vanilla gdb from my fresh install of ubuntu 10.04 as well as compiling the latest gdb from source.  I believe the basic things I'm doing should work with the plain vanilla gdb.
>
> $ ls *.d hb/*.d hb/*/*.d | wc -l
> 16
>
> $ dmd -gc -unittest -version=test *.d hb/*.d hb/*/*.d tango/core/Atomic.d tango/core/Traits.d -ofhousebot-test
>
> $ gdb ./housebot-test
> GNU gdb (GDB) 7.1-ubuntu
> <snip>
> Reading symbols from /home/jhouse/go/housebot/0.8/housebot-test...done.
> (gdb) break _Dmain
> Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x3f83 [in
> module /home/jhouse/go/housebot/0.8/housebot-test]
> (gdb) break main
> Breakpoint 1 at 0x805d097
> (gdb) run
> Starting program: /home/jhouse/go/housebot/0.8/housebot-test
> [Thread debugging using libthread_db enabled]
>
> Breakpoint 1, 0x0805d097 in main ()
> (gdb) list
> Dwarf Error: Cannot find DIE at 0x0 referenced from DIE at 0x3f83 [in
> module /home/jhouse/go/housebot/0.8/housebot-test]
> <snip>

You didn't say which dmd version, so I'll assume you're using dmd 1.059. If you're using anything earlier these errors are expected. The first step is to make sure that *everything* that has debug symbols is rebuilt. If you have a debug runtime or user library for tango that were built with -g, or with dmd <=1.058 then that will also cause these errors.

If you've checked all of the above, and are certain it's not PEBKAC then is there any chance you could email me a copy of your source code (or otherwise get a copy of your source to me, SVN/hg/git, uploading it somewhere, etc). If you can this will probably be the quickest/easiest way to figure out what's happening as I can narrow down these bugs in minutes after spending so long debugging DWARF errors now :P

If you can't do this for whatever reason, let me know and I'll give you some instructions on how to debug this further and work down a test case.

> $ latest_gdb_source/gdb/gdb ./housebot-test
> GNU gdb (GDB) 7.1.50.20100502-cvs
> <snip>
> Reading symbols from
> /home/jhouse/go/housebot/0.8/housebot-test...Segmentation fault
>
> $ gdb latest_gdb_source/gdb/gdb
> GNU gdb (GDB) 7.1.50.20100502-cvs
> <snip>
> Reading symbols from /home/jhouse/go/housebot/0.8/housebot-test...
> Program received signal SIGSEGV, Segmentation fault.
> 0x002a0d08 in ?? () from /lib/tls/i686/cmov/libc.so.6
> (gdb)

This is a gdb issue, you can either report a bug to gdb or give it a few revisions and try again... It is a cvs version, so it will be buggy :)

May 03, 2010
On 02/05/10 20:33, Jason House wrote:
> Maybe I'm just cursed with getting gdb to work with D :(  I've tried the plain vanilla gdb from my fresh install of ubuntu 10.04 as well as compiling the latest gdb from source.  I believe the basic things I'm doing should work with the plain vanilla gdb.

It seems the issues with debugging aren't fixed in dmd 1.059 and dmd 2.055. If you revert dmd changeset 451 and recompile dmd, debug info will work.


May 02, 2010
On May 2, 2010, at 4:29 PM, Robert Clipsham <robert at octarineparrot.com> wrote:

> You didn't say which dmd version, so I'll assume you're using dmd 1.059.

The newer 2.044 beta. The Tango files come from a D2 port of Tango. I use them because of D2's lack of atomics. I know Sean was waiting for the D2 design to settle before adding similar function to druntime.


>
>
> If you've checked all of the above, and are certain it's not PEBKAC then is there any chance you could email me a copy of your source code (or otherwise get a copy of your source to me, SVN/hg/git, uploading it somewhere, etc). If you can this will probably be the quickest/easiest way to figure out what's happening as I can narrow down these bugs in minutes after spending so long debugging DWARF errors now :P


What is PEBKAC? The source is in a public svn hosted by sourceforge. The project name is 'HouseBot'. It should be as easy as checking out and running 'make housebot-test'. I'll email you the svn URL and my generated version files when I get home, just in case either of those cause issues.
>
May 03, 2010
On 03/05/10 01:09, Jason House wrote:
> On May 2, 2010, at 4:29 PM, Robert Clipsham
> <robert at octarineparrot.com> wrote:
>
>> You didn't say which dmd version, so I'll assume you're using dmd 1.059.
>
> The newer 2.044 beta. The Tango files come from a D2 port of Tango. I use them because of D2's lack of atomics. I know Sean was waiting for the D2 design to settle before adding similar function to druntime.

Debugging is broken in 2.044 unfortunately, seems Walter's tweak to the patch broke some cases which I didn't test.

> What is PEBKAC? The source is in a public svn hosted by sourceforge. The project name is 'HouseBot'. It should be as easy as checking out and running 'make housebot-test'. I'll email you the svn URL and my generated version files when I get home, just in case either of those cause issues.

PEBKAC: Problem Exists Between Keyboard And Chair, also known as user error :)

I'll give it a shot and let you know if it works with the original patch.


May 02, 2010

Robert Clipsham wrote:
>
> It seems the issues with debugging aren't fixed in dmd 1.059 and dmd 2.055. If you revert dmd changeset 451 and recompile dmd, debug info will work.
>
>

Try changeset 466. Also uploaded as a new beta.
1 2 3
Next ›   Last »