Author Topic: Was D language debugging ever implemented?  (Read 3357 times)

Offline jca3

  • Single posting newcomer
  • *
  • Posts: 4
Was D language debugging ever implemented?
« on: April 22, 2011, 08:04:07 pm »

Like others before me, debugging D language in C::B returns these errors:

The command line option 'nx' is invalid
The command line option 'fullname' is invalid
The command line option 'quiet' is invalid

I've read the old messages on this subject and am curious if there is anything I can do now in 2011 to make this work better. 

Thanks,
John


Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Was D language debugging ever implemented?
« Reply #1 on: April 22, 2011, 09:26:28 pm »
Is your compiler emitting GDB compatible symbols?

If using DMD, are you using the -gc switch (to emulate C)?

Offline jca3

  • Single posting newcomer
  • *
  • Posts: 4
Re: Was D language debugging ever implemented?
« Reply #2 on: April 22, 2011, 10:34:51 pm »
 
  I am using DMD2 from Digital Mars. 
 
> Is your compiler emitting GDB compatible symbols?
> If using DMD, are you using the -gc switch (to emulate C)?
 
  Why no, I didn't even know about those options. 
 
  How do you implement them? 
 
 

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Re: Was D language debugging ever implemented?
« Reply #3 on: April 22, 2011, 10:46:01 pm »
  I am using DMD2 from Digital Mars. 
 
> Is your compiler emitting GDB compatible symbols?
> If using DMD, are you using the -gc switch (to emulate C)?
 
  Why no, I didn't even know about those options. 
 
  How do you implement them?

I don't think you need to need to implement anything else. You just need GDB (in addition to DMD) installed to your system. Make sure that GDB is selected as the debugger for your project. Then pass the -gc switch (you can set it at the project build options) before you compile your debug binaries. This switch makes sure that debug information is passed to the binary, but tricks GDB into analyzing it as C debug information. Currently, this is the only way to ensure compatibility with GDB.


Offline jca3

  • Single posting newcomer
  • *
  • Posts: 4
Re: Was D language debugging ever implemented?
« Reply #4 on: April 22, 2011, 11:14:29 pm »
 
> Make sure that GDB is selected as the debugger for your project.
 
  How do we check that?  I can debug my C++ projects fine, so something's running.  (This is C::B 10.05 BTW).
 
 
> Then pass the -gc switch (you can set it at the project build options)
 
  Is that to be added under Compiler Settings -> Other Options? 
 
  Thanks for your time...