added gdb multithread support for debugging