SDL2 2.0.5 raises a debugger exception to name threads at start, this seems to conflict with debugging through gdb. Add a call to SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING , '1'); to prevent SDL from doing this.