www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Linux Support

reply John Demme <me teqdruid.com> writes:
Last week a gentleman from the University of Oxford emailed me regarding
using D for a "real project".  He mentioned that he "absolutely needs a
decent debugger", and was asking about GDB (so I assuming he's using Linux).

Unfortunately, I couldn't recommend D for his project, seeing as the Linux
(GDB) debugging that supposedly currently exists is 100% broken.  Even the
DWARF committee did their part and gave D a place in their spec.  The
least D can do is pay it more than just the "lip service" it currently
does.

The ability to step through a program isn't considered to be a nicety by a
lot of people nowadays, but necessary, and a TOTAL LACK of it is EXTREMELY
detrimental to D.  More so than other "show stoppers" I would say.

Walter- I've alerted you to this issue several times, but have heard
nothing of your progress on it.  Is this an issue that you plan on taking
on anytime soon?  This is one of the MAJOR in conveniences about D which
causes me to give up on it and work on other (non-D) projects from time to
time.

-John Demme
Sep 07 2005
parent reply =?ISO-8859-1?Q?Thomas_K=FChne?= <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Demme schrieb:
 Last week a gentleman from the University of Oxford emailed me regarding
 using D for a "real project".  He mentioned that he "absolutely needs a
 decent debugger", and was asking about GDB (so I assuming he's using Linux).
 
 Unfortunately, I couldn't recommend D for his project, seeing as the Linux
 (GDB) debugging that supposedly currently exists is 100% broken.  Even the
 DWARF committee did their part and gave D a place in their spec.  The
 least D can do is pay it more than just the "lip service" it currently
 does.
 
 The ability to step through a program isn't considered to be a nicety by a
 lot of people nowadays, but necessary, and a TOTAL LACK of it is EXTREMELY
 detrimental to D.  More so than other "show stoppers" I would say.
The current situation 1) debug information: Windows: dmd -g Linux: dmd -g / dmd -gc 2) file names: no known issues 3) line numbers: - - sometimes missing or wrong e.g. compile and run the code in a debugger and check the line numbers http://dstress.kuehne.cn/norun/d/debug_info_08_A.d - - mixins / templates the provided information is suboptimal inclusion of the mixin's and the Template!() location would be useful (e.g. as comment) 4) type information: this looks like a neat little black hole
 Walter- I've alerted you to this issue several times, but have heard
 nothing of your progress on it.  Is this an issue that you plan on taking
 on anytime soon?  This is one of the MAJOR in conveniences about D which
 causes me to give up on it and work on other (non-D) projects from time to
 time.
D-DWARF to the rescue: 1) What informations should be encoded? 2) How and where should the information be encoded? 3) Document everything (including name demangling) 4) Add D-DWARF support to gdb 5) Implement missing debug encoding in DMD and GDC Everyone can help with steps 1) - 4) and 5) for GDC. Only Walter can implement step 5 for DMD. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDH1UA3w+/yD4P9tIRAuw+AJ93VXcGllE/0nKfKP0JFOV+WlDGogCgqkKJ IA/QfX05SHou0/BFh05ACkI= =HxMq -----END PGP SIGNATURE-----
Sep 07 2005
next sibling parent reply pragma <pragma_member pathlink.com> writes:
In article <dfnk9g$11m8$1 digitaldaemon.com>, =?ISO-8859-1?Q?Thomas_K=FChne?=
says...
D-DWARF to the rescue:

1) What informations should be encoded?
2) How and where should the information be encoded?
3) Document everything (including name demangling)
4) Add D-DWARF support to gdb
5) Implement missing debug encoding in DMD and GDC

Everyone can help with steps 1) - 4) and 5) for GDC.
While I echo John's feelings about Walter's need to fix this situation, I suppose the DIY route is all we really have for now. If it helps, I'm going to have to write a demangler (export(D) symbol parser) for my DDL project. If you don't mind it being written in D, I can gladly contribute that piece of the puzzle. At the very least, I can throw a wiki page As for points 4 and 5, I think I speak for a lot of folks here when I say "how the heck do I do *that*"? Thomas, is there any way at all that you could post a kind of "brain dump" of what you know needs to be done to GDC/GDB for all this? Kind of like a road-map or how-to guide that can be posted here on on the wiki? I sincerely think that would be a huge help. :) While I don't have a ton of time to help on this maybe someone else does, but is lacking documentation and general know-how to augment/hack these programs. Or worse yet, all the knowlegable talent is tied up in current projects, so whomever will need something to return to later on. At the very least such a guide then becomes a standing "TODO: do the following" for this needed part.
Only Walter can implement step 5 for DMD.
Hey, at least we stand a chance at getting GDB usable. It's a start! - EricAnderton at (wants a debugger badly) yahoo
Sep 07 2005
next sibling parent James Dunne <james.jdunne gmail.com> writes:
pragma wrote:
 In article <dfnk9g$11m8$1 digitaldaemon.com>, =?ISO-8859-1?Q?Thomas_K=FChne?=
 says...
 
D-DWARF to the rescue:

1) What informations should be encoded?
2) How and where should the information be encoded?
3) Document everything (including name demangling)
4) Add D-DWARF support to gdb
5) Implement missing debug encoding in DMD and GDC

Everyone can help with steps 1) - 4) and 5) for GDC.
While I echo John's feelings about Walter's need to fix this situation, I suppose the DIY route is all we really have for now. If it helps, I'm going to have to write a demangler (export(D) symbol parser) for my DDL project. If you don't mind it being written in D, I can gladly contribute that piece of the puzzle. At the very least, I can throw a wiki page As for points 4 and 5, I think I speak for a lot of folks here when I say "how the heck do I do *that*"? Thomas, is there any way at all that you could post a kind of "brain dump" of what you know needs to be done to GDC/GDB for all this? Kind of like a road-map or how-to guide that can be posted here on on the wiki? I sincerely think that would be a huge help. :) While I don't have a ton of time to help on this maybe someone else does, but is lacking documentation and general know-how to augment/hack these programs. Or worse yet, all the knowlegable talent is tied up in current projects, so whomever will need something to return to later on. At the very least such a guide then becomes a standing "TODO: do the following" for this needed part.
Only Walter can implement step 5 for DMD.
Hey, at least we stand a chance at getting GDB usable. It's a start! - EricAnderton at (wants a debugger badly) yahoo
demangle.d (and dsymextract.d) is already written and lives in bindings project at dsource.org. Support for some of the odd named exportable entities (like _ClassInfo_, _Module_, etc.) is a bit limited at the moment, but function demangling works nearly flawlessly. -- Regards, James Dunne
Sep 07 2005
prev sibling next sibling parent John Demme <me teqdruid.com> writes:
On Wed, 07 Sep 2005 21:35:33 +0000, pragma wrote:
 If it helps, I'm going to have to write a demangler (export(D) symbol parser)
There's actually one already written in D in dsource's bindings area. I also ported it to C and put it in GDB- there's a GDB patch on dsource. -John Demme
Sep 07 2005
prev sibling parent pragma <EricAnderton youknowthedrill.yahoo> writes:
pragma wrote:
 If it helps, I'm going to have to write a demangler (export(D) symbol parser)
 for my DDL project.  If you don't mind it being written in D, I can gladly
 contribute that piece of the puzzle.  At the very least, I can throw a wiki
page

(replying to self as there were multiple child posts to the above) John and James, thanks for steering me in the right direction. You just saved me a lot of effort! - EricAnderton at yahoo
Sep 07 2005
prev sibling parent John Demme <me teqdruid.com> writes:
On Wed, 07 Sep 2005 23:00:48 +0200, Thomas Kühne wrote:
 3) line numbers:
 - - sometimes missing or wrong
     e.g. compile and run the code in a debugger and check the line
     numbers http://dstress.kuehne.cn/norun/d/debug_info_08_A.d
That should probably be amended to say "always missing or wrong". I've yet to see it work. This is really the big thing in my opinion. The windows guys at least have this much, why not us unix guys? -John Demme
Sep 07 2005