www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Debug on OSX?

reply Dan Olson <zans.is.for.cans yahoo.com> writes:
I tried dmd -gc like on linux but gdb on OSX doesn't seem happy.  Is
there a way to get the debuger to work with dmd on OSX?

Thanks,
Dan
Sep 05 2011
parent reply Jacob Carlborg <doob me.com> writes:
On 2011-09-06 05:22, Dan Olson wrote:
 I tried dmd -gc like on linux but gdb on OSX doesn't seem happy.  Is
 there a way to get the debuger to work with dmd on OSX?

 Thanks,
 Dan
There are things that won't work with gdb and dmd on Mac OS X due to a bug in dmd. dmd outputs incorrect DWARF section names, or something like that. -- /Jacob Carlborg
Sep 05 2011
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 06/09/2011 07:25, Jacob Carlborg wrote:
 On 2011-09-06 05:22, Dan Olson wrote:
 I tried dmd -gc like on linux but gdb on OSX doesn't seem happy. Is
 there a way to get the debuger to work with dmd on OSX?

 Thanks,
 Dan
There are things that won't work with gdb and dmd on Mac OS X due to a bug in dmd. dmd outputs incorrect DWARF section names, or something like that.
No, it outputs correct section names now, there's some other issue. I've tried to track it down but can't find it. One obvious missing step is that dmd doesn't currently use dsymutil to generate a dsym file - there's no point it doing this though currently as dsymutil crashes on binaries produced by dmd. There's something else missing or broken in dmd's DWARF output causing dsymutil to crash. -- Robert http://octarineparrot.com/
Sep 06 2011
parent Jacob Carlborg <doob me.com> writes:
On 2011-09-06 18:57, Robert Clipsham wrote:
 On 06/09/2011 07:25, Jacob Carlborg wrote:
 On 2011-09-06 05:22, Dan Olson wrote:
 I tried dmd -gc like on linux but gdb on OSX doesn't seem happy. Is
 there a way to get the debuger to work with dmd on OSX?

 Thanks,
 Dan
There are things that won't work with gdb and dmd on Mac OS X due to a bug in dmd. dmd outputs incorrect DWARF section names, or something like that.
No, it outputs correct section names now, there's some other issue.
Ah, that's good.
 I've tried to track it down but can't find it. One obvious missing step
 is that dmd doesn't currently use dsymutil to generate a dsym file -
 there's no point it doing this though currently as dsymutil crashes on
 binaries produced by dmd. There's something else missing or broken in
 dmd's DWARF output causing dsymutil to crash.
Ok, I see. -- /Jacob Carlborg
Sep 06 2011