First of all, did you build ZC with debugging symbols? Secondly, it's much easier to use gdb from inside an IDE which can integrate with it, such as C::B for instance. I don't recommend command-line or printf debugging.