Gdb Error While Executing Callback Function In Python