I don't have time right now to comment on all of that, but here's something helpful.

On Wed, Jan 23, 2013 at 10:16 PM, Derek Gaston <friedmud@gmail.com> wrote:
So how do I even run an example in a debugger?

libtool --mode=execute gdb executable