D.gnu - Debugging gdc
- Mike Farnsworth (3/3) Feb 09 2011 In my adventures with adding gcc __builtin_* functions, I was able to ge...
- Iain Buclaw (4/6) Feb 09 2011 gdc -c foo.d -wrapper gdb,--args
In my adventures with adding gcc __builtin_* functions, I was able to get them to work if I defined any VECTOR_TYPE gcc trees as a D struct (long story, for another post). When adding the builtin structs, if I registered the struct definitions in the gcc.builtins module, and then built phobos2, it would ICE with a segfault. But, if I didn't add those definitions, the regular D code I was compiling wouldn't know the types. (I built phobos2 without registering them, then rebuilt gdc with them registered without building phobos2 again in order to make it work). I am utterly unable to attach gdb to gdc to catch the crash, though. How do I debug gdc to find where the crash happens? Am I relegated to the printf debugger? =) -Mike
Feb 09 2011
== Quote from Mike Farnsworth (mike.farnsworth gmail.com)'s articleHow do I debug gdc to find where the crash happens? Am I relegated to theprintf debugger? =)-Mikegdc -c foo.d -wrapper gdb,--args Will invoke the compiler under "gdb --args".
Feb 09 2011