Failure to attach debugger due to GDB command time-out

We’re running an Unreal Engine 4 GearVR game on a Samsung Galaxy S6. In Visual Studios 2015, when I try to attach the debugger to our running process, the debugger fails to attach after some GDB commands time out.

From “Nsight Tegra.log” (I removed timestamps for readability):

INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] command: "12-file-exec-and-symbols "C:/Users/stevem.TURTLEROCK/AppData/Local/Temp/Nsight_Tegra_devices/05157df552b2dd13/symbols32/system/bin/app_process32""
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] stdout: 12^done
INFO|Nvidia.PentaK.Target.Android.AndroidDevice|gdbserver connection type: cable
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] command: "13-target-select remote :2020"
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] stdout: =thread-group-started,id="i1",pid="24193"

[...many thread start messages that look successful...]
[...many library load messages that look successful...]

INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] stdout: =library-loaded,id="libvrapiimpl.so",target-name="libvrapiimpl.so",host-name="libvrapiimpl.so",symbols-loaded="0",thread-group="i1"
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] stdout: &"warning: Could not load shared library symbols for 4 libraries, e.g. libgnustl_shared.so.\nUse the \"info sharedlibrary\" command to see the complete listing.\nDo you need \"set solib-search-path\" or \"set sysroot\"?"
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] stdout: &"\n"
ERROR|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] has not responded to "-target-select remote :2020" command in 20000 ms. The command is timed-out.
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] command: "14-thread-list-ids"
ERROR|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] has not responded to "-thread-list-ids" command in 20000 ms. The command is timed-out.
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] command: "15-exec-continue"
ERROR|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] has not responded to "-exec-continue" command in 20000 ms. The command is timed-out.
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] command: "-exec-interrupt"
INFO|Nvidia.PentaK.Debug.Interop.Gdb.GdbProcessManager|[GDB] command: "-gdb-exit"

Does anyone know why GDB fails to respond?

Update:

When we issue all the same commands manually from command shells, GDB connects and works! But it takes like 60 seconds to load symbols from our game’s .so file.

The Visual Studio debugger plugin that wraps GDB times out if a command to GDB hasn’t finished in 20 seconds. I wonder if there is a way to change that timeout!

Tools --> Options --> Nsight Tegra --> Debug --> Timeout, s: set to 200 seconds.

yes, that’s correct