Thread overview
GDC documentation and debugging problems
Sep 07, 2012
Gyula Gubacsi
Sep 07, 2012
David
Sep 07, 2012
Iain Buclaw
Sep 07, 2012
Peter Alexander
Sep 07, 2012
Peter Alexander
Sep 07, 2012
Iain Buclaw
Sep 07, 2012
Iain Buclaw
September 07, 2012
Hi,

I'm trying to build the gdc project but I ran in to the problem that
since you moved to the github, there isn't really a project page that
would describe how to build the gdc project that is up-to-date. I
noticed that there were some changes in the project structure, so it
would make sense to take the docs from the bitbucket website and add
them to the git repository's root. (Currently, the system finds the
README in the "https://github.com/D-Programming-GDC/GDC/tree/master/gcc/d"
directory, but this file doesn't contain any description how to build
the current source tree. I will probably work it out for my self, but
it would be great if you could move the bitbucket wiki/readme to the
github repo's root.

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.

Sincerely

Gyula Gubacsi
September 07, 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.


September 07, 2012
On Friday, 7 September 2012 at 13:33:53 UTC, Gyula Gubacsi wrote:
> Hi,
>
> I'm trying to build the gdc project but I ran in to the problem that
> since you moved to the github, there isn't really a project page that
> would describe how to build the gdc project that is up-to-date. I
> noticed that there were some changes in the project structure, so it
> would make sense to take the docs from the bitbucket website and add
> them to the git repository's root. (Currently, the system finds the
> README in the "https://github.com/D-Programming-GDC/GDC/tree/master/gcc/d"
> directory, but this file doesn't contain any description how to build
> the current source tree. I will probably work it out for my self, but
> it would be great if you could move the bitbucket wiki/readme to the
> github repo's root.
>
> 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.
>
> Sincerely
>
> Gyula Gubacsi


-fdebug-c sets the lang_name to "GNU C", which may alter the way some debug information is emitted.  It does not itself turn on debugging symbols.

Similarly, -fdebug only turns on 'debug' statements.


To turn on debug symbols, use -g.  Which is the same switch as you would use in other GCC front end compilers.


Github is a means to host the code, not the project.  To read information on the project, see the following links.

http://gdcproject.org
http://gdcproject.org/wiki
http://gdcproject.org/bugzilla


Regards
Iain
September 07, 2012
On Friday, 7 September 2012 at 13:33:53 UTC, Gyula Gubacsi wrote:
> Hi,
>
> I'm trying to build the gdc project but I ran in to the problem that
> since you moved to the github, there isn't really a project page that
> would describe how to build the gdc project that is up-to-date. I
> noticed that there were some changes in the project structure, so it
> would make sense to take the docs from the bitbucket website and add
> them to the git repository's root. (Currently, the system finds the
> README in the "https://github.com/D-Programming-GDC/GDC/tree/master/gcc/d"
> directory, but this file doesn't contain any description how to build
> the current source tree. I will probably work it out for my self, but
> it would be great if you could move the bitbucket wiki/readme to the
> github repo's root.
>
> 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
>

This particular warning is to do with the way the package maintainers have built gdc, and not to do with the compiler itself.  But should be mostly harmless in non-multilib situations.


Regards
Iain
September 07, 2012
On Friday, 7 September 2012 at 13:54:32 UTC, Iain Buclaw wrote:
> Github is a means to host the code, not the project.  To read information on the project, see the following links.
>
> http://gdcproject.org
> http://gdcproject.org/wiki
> http://gdcproject.org/bugzilla

Could these links please me added to a README.md in github repo. This causes the links to be displayed on the main github pages, letting people know where to look.

I (and apparently the OP) had absolutely no idea that these websites existed.


September 07, 2012
On Friday, 7 September 2012 at 14:44:44 UTC, Peter Alexander wrote:
> On Friday, 7 September 2012 at 13:54:32 UTC, Iain Buclaw wrote:
>> Github is a means to host the code, not the project.  To read information on the project, see the following links.
>>
>> http://gdcproject.org
>> http://gdcproject.org/wiki
>> http://gdcproject.org/bugzilla
>
> Could these links please me added to a README.md in github repo. This causes the links to be displayed on the main github pages, letting people know where to look.
>
> I (and apparently the OP) had absolutely no idea that these websites existed.

I've created a pull request: https://github.com/D-Programming-GDC/GDC/pull/28

See here to preview: https://github.com/Poita/GDC/tree/readme
September 07, 2012
On 7 September 2012 15:45, Peter Alexander <peter.alexander.au@gmail.com> wrote:
> On Friday, 7 September 2012 at 13:54:32 UTC, Iain Buclaw wrote:
>>
>> Github is a means to host the code, not the project.  To read information on the project, see the following links.
>>
>> http://gdcproject.org
>> http://gdcproject.org/wiki
>> http://gdcproject.org/bugzilla
>
>
> Could these links please me added to a README.md in github repo. This causes the links to be displayed on the main github pages, letting people know where to look.
>
> I (and apparently the OP) had absolutely no idea that these websites
> existed.
>

You should hang round #d.gdc more often then. :^)



-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';