gtkd-developers / GtkD

GtkD is a D binding and OO wrapper of GTK+ originally created by Antonio Monteiro
http://gtkd.org
Other
322 stars 71 forks source link

add debug info #269

Closed Aphexus closed 5 years ago

Aphexus commented 5 years ago

May I suggest you add debug info if build is built as debug? debug { string DEBUG = "-g -gf -debug -boundscheck=on"; } else string DEBUG = "";

then

void buildObj(string files, string objName) { std.file.write("build.rf", format(DEBUG~" -c %s -Igenera

Aphexus commented 5 years ago

Also, it doesn't seem to support mscoff?

Aphexus commented 5 years ago

I can't edit my commend for some reason. In any case, when trying to build for coff I get no lib. It seems to build the objects but doesn't go beyond that. Works for omf and 64-bit.

Aphexus commented 5 years ago

I was able to get the build to do mscoff by adding it to the appropriate places.

My suggestion is to add the mscoff feature along with debugging capabilities.

Also, I do not know why you have two different build paths for 32 and 64 bit... seems the 64 bit is simpler. Can these not be merged in to one? That way one only has to modify a flag for the different build types in one place. Or does it do this to split up the lib in to multiple parts to avoid the 32-bit limitations? (I don't think coff has those so maybe you can just copy the 64-bit path?).

MikeWey commented 5 years ago

The 32bit build path is more complicated because 32bit dmd runs out of memory. optlink also crashes when building with debug information. https://issues.dlang.org/show_bug.cgi?id=15418

Tough debug info can be added for the mscoff options.

MikeWey commented 5 years ago

The 32bit build path is more complicated because 32bit dmd runs out of memory.

Just checked this one, we actually hit a limit with the number of symbols in the object file.