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 :)
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta