Setting up GDB debugger with Eclipse

Michael Sentinella mikeandmarjo at gmail.com
Wed Mar 12 05:16:54 PDT 2014


>> This is where I am at with the debugger, it says it has no 
>> line number
>> information:
>>
>> http://tryimg.com/4/nolin.png
>
> When GDB says function main has no line number information, 
> it's referring to the C runtime main function, not the D main 
> from HelloWorld.d . Normally none of the C runtime will have 
> debug information.
> In that situation, if you place a breakpoint int the 
> writeln("Hello world!") line, and then resume execution, it 
> should run up to that point. Give that a try.

I have found the problem and now the debugger works as can be 
seen in the screen-captures below. The compiler DMD was not being 
given the -g argument.

Right-click project
http://tryimg.com/4/1righ.png

Click project properties
http://tryimg.com/4/2hove.png

Resize window
http://tryimg.com/4/4proj.png

Window resized
http://tryimg.com/4/8proj.png

Emplace -g as argument for compiler
http://tryimg.com/4/9comp.png

Click debug
http://tryimg.com/4/10deb.png

No source available, close that.
http://tryimg.com/4/11nos.png

Click Step-Over, reaches breakpoint
http://tryimg.com/4/12ste.png

Click Step-Over again, execution steps forward
http://tryimg.com/4/13ste.png

Click Step-Over again, execution steps forward
http://tryimg.com/4/14ste.png


Cheers, Mike.




More information about the Digitalmars-d-ide mailing list