D.gnu - debug doesn't work?
- Ramon (12/12) Sep 05 2013 The compiler switch '-debug' isn't recognized (which isn't a
- H. S. Teoh (8/25) Sep 05 2013 [...]
- Ramon (3/30) Sep 05 2013 Tried, worked - great.
- Jacob Carlborg (4/6) Sep 05 2013 Or use GDMD, a wrapper around GDC with the same command line syntax as D...
The compiler switch '-debug' isn't recognized (which isn't a problem per se, but...) "debug" statements in the code are ignored. Example: ... debug writeln("DBG: var X is: ", X, "'"); ... When in the debugger (gdb) the "debug" section (the 2 lines above) are simply ignored/stepped over. Is this a problem or is it me not knowing how to do it properly? Thanks -R
Sep 05 2013
On Fri, Sep 06, 2013 at 12:18:44AM +0200, Ramon wrote:The compiler switch '-debug' isn't recognized (which isn't a problem per se, but...) "debug" statements in the code are ignored. Example: ... debug writeln("DBG: var X is: ", X, "'"); ... When in the debugger (gdb) the "debug" section (the 2 lines above) are simply ignored/stepped over. Is this a problem or is it me not knowing how to do it properly?[...] GDC uses a slightly modified form of DMD compile flags. The flag you're looking for is -fdebug. HTH. T -- "How are you doing?" "Doing what?"
Sep 05 2013
On Thursday, 5 September 2013 at 22:25:27 UTC, H. S. Teoh wrote:On Fri, Sep 06, 2013 at 12:18:44AM +0200, Ramon wrote:Tried, worked - great. Thanks for the friendly, quick fix - RThe compiler switch '-debug' isn't recognized (which isn't a problem per se, but...) "debug" statements in the code are ignored. Example: ... debug writeln("DBG: var X is: ", X, "'"); ... When in the debugger (gdb) the "debug" section (the 2 lines above) are simply ignored/stepped over. Is this a problem or is it me not knowing how to do it properly?[...] GDC uses a slightly modified form of DMD compile flags. The flag you're looking for is -fdebug. HTH. T
Sep 05 2013
On 2013-09-06 00:23, H. S. Teoh wrote:GDC uses a slightly modified form of DMD compile flags. The flag you're looking for is -fdebug.Or use GDMD, a wrapper around GDC with the same command line syntax as DMD. -- /Jacob Carlborg
Sep 05 2013