Added a gdb script to help diagnose protocol errors