Workaround for Apple’s GDB bug…

I had unconsciously found the workaround a few months ago while hacking around Little Snitch with kernel debugging. To make things easier I had a small gdb script to call the debug kit macros and set all the variables that are the source of the problem with gdbinit. This was something I never thought about, just accepted it.

Today, while answering to a comment, the connection was made inside my brain (I love how the brain works!) and I decided to test it. And voila, it worked !

The workaround is as simple as reloading the gdbinit. You just need to issue the command “source ~/.gdbinit” after gdb is started either with “gdb target_to_debug” or inside gdb by using the “file” command !

And that’s it, simple things work best !


Leave a Reply

Your email address will not be published. Required fields are marked *