GDC documentation and debugging problems

David d at dav1d.de
Fri Sep 7 06:39:45 PDT 2012


On Friday, 7 September 2012 at 13:33:53 UTC, Gyula Gubacsi wrote:
> As an other question, I'm working on Linux Mint, and I tried to 
> build
> a simple hello world program with gdc and debug it with gdb. I
> compiled my little program with the following command:
>
>     $ gdc -fdebug-c main.d -o main
>     cc1d: warning: command line option "-imultilib" is valid for
> C/C++/Fortran/ObjC/ObjC++ but not for D
>
> I don't think the warning has anything to do with it, but for 
> the
> record that's what I've got right in the beginning. So when I 
> try to
> debug, the gdb is complaining:
>
>     Reading symbols from
> /home/progician/gdc-debugging-experience/main...(no debugging 
> symbols
> found)...done.
>
> I also tried this using the -fdebug switch only but I've got 
> the same
> results. The symbol table however looks working, because I was 
> able to
> call and use this:
>
>     gdb>break main
>
> I know that the gdb has no specific D support, other than name
> mangling (which probably worked as it was able to find the main
> function) but I expected to see some debugging info.

I think you need -fdebug-c and -g for gdb readable debug-symbols.




More information about the D.gnu mailing list