title: How to debug Android/GDB/Qt problems?
body: <p>I've been developing an Android app with Qt for months now.  I used to be able to debug with no problems in Qt Creator, but now the debugger fails to start.  The deploy process works -- the app can be started from the device GUI.</p>
  
  <p>Sample projects build and can be debugged normally.</p>
  
  <p>I'm using NDK 10e because anything later confuses Creator, which tells me that the Qt people aren't using a recent build.</p>
  
  <p>I have the latest version of the SDK, developing on OS X.</p>
  
  <p>The Debugger Log window ends with this:</p>
  
  <pre><code>~"Loaded symbols for /Users/tjdaniel/projects/qt/5.6.0/plugins/sensors/libqtsensors_android.so\n"
  ~"Reading symbols from /Users/tjdaniel/projects/build/localization/android/Debug/liblocalization.so..."
  sReading /Users/tjdaniel/projects/build/localization/android/Debug/liblocalization.so......
  
  dHANDLE GDB ERROR: The gdb process was ended forcefully
  dGDB PROCESS FINISHED, status 1, exit code 11
  dNOTE: ENGINE ILL ******
  </code></pre>
  
  <p>And here is the output of adb logcat:</p>
  
  <pre><code>W/linker  (12790): libqtforandroid.so: unused DT entry: type 0x1d arg 0x8d9a
  W/linker  (12790): Unsupported flags DT_FLAGS_1=0x81
  I/Qt      (12790): qt start
  W/linker  (12790): libqandroidbearer.so: unused DT entry: type 0x1d arg 0x174f
  W/linker  (12790): Unsupported flags DT_FLAGS_1=0x81
  W/linker  (12790): libqtmedia_android.so: unused DT entry: type 0x1d arg 0x51da
  W/linker  (12790): Unsupported flags DT_FLAGS_1=0x81
  W/linker  (12790): libqtsensors_android.so: unused DT entry: type 0x1d arg 0x1076
  W/linker  (12790): Unsupported flags DT_FLAGS_1=0x81
  I/Qt      (12790): Sensors start
  W/linker  (12790): liblocalization.so: unused DT entry: type 0x1d arg 0x29f5f4
  D/        (12790): (null):0 ((null)): QML debugging is enabled. Only use this in a safe environment.
  I/Qt JAVA (12790): DEBUGGER: extra parameters: Bundle[{debug_ping=true, gdbserver_socket=/data/data/org.qtproject.example.localization/debug-socket, qml_debug=true, gdbserver_command=/data/data/org.qtproject.example.localization/lib/libgdbserver.so --multi +/data/data/org.qtproject.example.localization/debug-socket, qmljsdebugger=port:56956,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector, ping_socket=org.qtproject.example.localization.ping_pong_socket}]
  I/Qt JAVA (12790): DEBUGGER: removing gdb socket /data/data/org.qtproject.example.localization/debug-socket
  I/Qt JAVA (12790): DEBUGGER: starting /data/data/org.qtproject.example.localization/lib/libgdbserver.so --multi +/data/data/org.qtproject.example.localization/debug-socket
  I/Qt JAVA (12790): DEBUGGER: gdbserver started
  I/Qt JAVA (12790): DEBUGGER: waiting for socket at /data/data/org.qtproject.example.localization/debug-socket, attempt 0
  I/Qt JAVA (12790): DEBUGGER: waiting for socket at /data/data/org.qtproject.example.localization/debug-socket, attempt 1
  I/Qt JAVA (12790): DEBUGGER: socket ok
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Debug socket accepted
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/Qt JAVA (12790): DEBUGGER: Waiting for debug socket connect
  I/Qt JAVA (12790): DEBUGGER: go to sleep
  I/ConfigService( 1968): onDestroy
  W/ActivityManager(  845): Launch timeout has expired, giving up wake lock!
  </code></pre>
  
  <p>Any advice on how to debug this??  Not being able to use the debugger is killing me.  I've wiped and reinstalled everything related to Qt.. no luck.</p>