dasmithii / Kit

project manager for c/c++
MIT License
65 stars 6 forks source link

Debugging #18

Closed samuelmanzer closed 10 years ago

samuelmanzer commented 10 years ago

Hey Adam,

Added a '-d'/'--debug' option to build with debug symbols and if the command is test to invoke lldb/gdb on the tests executable. I'd like to have it auto set a break point on whatever 'greatest' function gets called on failure, but I tried it on 'greatest_do_fail' and it didn't work, and lldb can't seem to read 'run' from a file anyway so that will have to wait.

dasmithii commented 10 years ago

Another useful addition. Thanks!

In terms of segfaulting tests, there might be something we can do within the Greatest source itself. Maybe with some implicit assert() calls - I'm not sure. I'll have some time later tonight to experiment a bit

samuelmanzer commented 10 years ago

Yeah the tricky bit is that for some reason lldb breaks on the GREATEST_MAIN_DEFS call when you tell it to break on entry to greatest_do_fail, instead of on the actual failing ASSERT. I'd be interested to know if that's reproducible on another OS/debugger - can't test easily cause gdb on Mavericks is pretty terrible.