debugging - How do I get gdb working with D programs under linux? -
I have a compromise gdb
6.8, but I can not find any debugging to work. Could. Looking at this test file:
import std.stdio; Zero main () {float f = 3.0; Int i = 1; Retail (F, "", I); F + = cast (float) (i / 10.0); Retail (F, "", I); I ++; F + = cast (float) (i / 10.0); Retail (F, "", I); I + = 2; F + = dot (float) (I / 5.0); Retail (F, "", I); }
and try to debug on the command line:
bash-4.0 [d] $ dmd -g test.d # '-gc' Show The same behavior is Bash-4.0 [d] $ ~ / src / gdb-6.8 / gdb / gdb test GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3 +: GNU GPL version 3 or later & lt; Http: // gnu org / license / gpl.html & gt; It's free software: You are free to change and redistribute it. There is no warranty to the extent permitted by law, type "copy show" and "show warranty" for details. This GDB "i686-pc-linux-gnu" ... (gdb) list 1 ../sysdeps/i386/ Was configured as elf / start.S: There is no such file or directory by using
by usingand debug a project with Eclipse
Dwarf error: 0x134e4 can not be referenced on DEE 0x12bd4 [Module / Home / Burner / Projects / D RIL / DRL I386] (GDB) Dwarf error: DEEI can not get 0x1810 referenced from: 0x1b8 [Module / Home / Burner / Projects / DRL / DRL 386]
< Code> -g :
Die (GDB): DWGag_ & lt; Unknown & gt; (ABV = 7, offset = 567) are children: FALSE Features: DW_AT_byte_size (DW_FORM_data1) Continuous: 4DW_AT_type (DW_FORM_ref4) Continuous Ref: 561 (Adjusted) DW_AT_containing_type (DW_FORM_ref4) Continuous Ref: 539 (Adjusted) Dwarf Error: Type Can not die [Module / Home / Burn / Projects / Drill / Drill. I386]
I have seen a lot of posts on the digital merge news group like this, but everyone appears to be. Can anybody shed some light on the situation?
I know the zeroboo, but I really want to work with
gdb
.Update: Thanks for looking at IRC (Freenode, #D), I'm doing simple matter (a file):
(gdb ) List Diman 1 Zero Main () 2 {3 Float F = 3.0; 4bit i = 1; 5 F + = cast (float) (I / 10.0); 6i ++; 7f + = dot (float) (i / 10.0); 8i + = 2; 9f + = cast (float) (I / 5.0); 10} (gdb) break 3
Unfortunately, my project with many projects dies with DWARF error. Edit:
As 2.036 (I think), the GDB debugging information produced by the DMD is correct, and should work as expected.
GDB
bug, which recently Was decided. To decide, you will have to make CVS to GDB
head. Instructions about how to get it.
If that does not fix the problem, then it may be due to another bug in GDB
, or it may be that dmd
is incorrect Emerges DWARF debug info I suggest opening a bug in GDB
and enclosing my small executable (and all runtime libraries required) .
Comments
Post a Comment