Android debugger does not work
-
I am trying to debug Android application on fresh installation. SDK and NDK are present and added to the PATH, Qt Creator knows about them.
But when I select Android armv7 kit and press "Debug" for simple Hello World application it just says:
Debugging starts
Debugging has finishedDebugger log is the following, also nothing particularly useful here:
Starting debugger "GdbEngine" for ABI "arm-linux-android-elf-32bit"... dStart parameters: 'org.qtproject.example.debug_test' mode: 6 dABI: arm-linux-android-elf-32bit dLanguages: c++ dExecutable: /home/alexey/work_objscanning/src/misc/test/debug_test/build-debug_test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Release/app_process dDebugger: /home/alexey/work_objscanning/tools/android-ndk-r10d/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb dQML server: 127.0.0.1:3768 dRemote: :5039 dSysroot: dDebug Source Location: dDebugger settings: dBreakOnAbort: true (default: false) *** dShowQmlObjectTree: true (default: true) dNoPluginBreakpoints: false (default: false) dSelectedPluginBreakpointsPattern: .* (default: .*) dSelectedPluginBreakpoints: false (default: false) dAdjustBreakpointLocations: true (default: true) dBreakOnWarning: false (default: false) dBreakOnFatal: true (default: false) *** dBreakOnThrow: false (default: false) dBreakOnCatch: false (default: false) dWatchdogTimeout: 120 (default: 20) *** dAutoEnrichParameters: true (default: true) dGdbStartupCommands: (default: ) dGdbPostAttachCommands: (default: ) dWarnOnReleaseBuilds: true (default: true) dMultiInferior: true (default: false) *** dUseDynamicType: true (default: true) dTargetAsync: false (default: false) dCDB_Console: false (default: false) dBreakpointCorrection: true (default: true) dBreakEvent: (default: ) dBreakOnCrtDbgReport: false (default: false) dLoadGdbDumpers2: true (default: false) *** dAttemptQuickStart: true (default: false) *** dIgnoreFirstChanceAccessViolation: false (default: false) dLoadGdbInit: true (default: true) dDisplayStringLimit: 110 (default: 100) *** dListSourceFiles: false (default: false) dAutoDerefPointers: true (default: true) dMaximalStringLength: 10000 (default: 10000) dAllPluginBreakpoints: true (default: true) dSkipKnownFrames: false (default: false) dEnableReverseDebugging: false (default: false) dMaximalStackDepth: 44 (default: 20) *** dIntelFlavor: false (default: false) dIdentifyDebugInfoPackages: true (default: false) *** dShowQtNamespace: true (default: true) dSortStructMembers: true (default: true) dShowStandardNamespace: true (default: true) dCloseBuffersOnExit: true (default: false) *** dCloseMemoryBuffersOnExit: true (default: true) dRaiseOnInterrupt: true (default: true) dStationaryEditorWhileStepping: false (default: false) dSwitchModeOnExit: false (default: false) dBreakpointsFullPath: true (default: false) *** dFontSizeFollowsEditor: false (default: false) dUseMessageBoxForSignals: true (default: true) dUseAlternatingRowColours: false (default: false) dLogTimeStamps: false (default: false) dVerboseLog: false (default: false) dAutoQuit: false (default: false) dAlwaysAdjustColumnWidths: true (default: true) dExtraDumperFile: (default: ) dUseAddressInStackView: false (default: false) dSymbolPaths: (default: ) dSourcePaths: (default: ) dGdbCustomDumperCommands: (default: ) dAdditionalArguments: (default: ) dShowThreadNames: true (default: false) *** dUseToolTips: true (default: true) dUseDebuggingHelper: true (default: true) dUseCodeModel: true (default: true) dUseToolTipsInBreakpointsView: false (default: true) *** dUseAddressInBreakpointsView: false (default: false) dUseToolTipsInLocalsView: false (default: false) dUseToolTipsInBreakpointsView: false (default: false) dQmlInspector.ShowAppOnTop: false (default: false) dState changed from DebuggerNotReady(0) to EngineSetupRequested(1) [master] dQUEUE: SETUP ENGINE dCALL: SETUP ENGINE dTRYING TO START ADAPTER dNOTE: REQUEST REMOTE SETUP dNOTE: INFERIOR EXITED dState changed from EngineSetupRequested(1) to InferiorExitOk(16) [master] dState changed from InferiorExitOk(16) to InferiorShutdownOk(19) [master] dState changed from InferiorShutdownOk(19) to EngineShutdownRequested(20) [master] dQUEUE: SHUTDOWN ENGINE dCALL: SHUTDOWN ENGINE dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 0 dNOTE: ENGINE SHUTDOWN OK dState changed from EngineShutdownRequested(20) to EngineShutdownOk(22) [master] dState changed from EngineShutdownOk(22) to DebuggerFinished(23) [master] dQUEUE: FINISH DEBUGGER dNOTE: FINISH DEBUGGER dHANDLE RUNCONTROL FINISHED sDebugger finished.
How do I diagnose this?
-
-
-
@sharethl I have a similar issue, that no one has been able to answer. No problem debugging as a desktop application, but the mobile debugger does not work at all on android. I can run apps as well. I have tried three different NDK's 9, and latest two version of 10, also tried recent SDK, and one before it. I am guessing there is a major bug, as I have tried for 2 days to get something to work on a very basic application.
-
@sharethl Did you have to go back to "Platform SDK Tools" rev 22.x.x or the "Andoird SDK Platform Tools" rev 22 in Android SDK Manager? I am currently trying rev 22.6.2 of the SDK (the name of the tar.gz file) . I'll let you all know it goes, but I would rather be using the newest version that work, as this version doesn't support lollipop levels of API, android 4.4.2 is the highest level. Screen Grab of android sdk manager
-
@sharethl Thanks for sharing. I will definitely lodge a bug against this over for the newest Qt Creator. I wonder if I just missed somewhere in the notes that it wouldn't work with anything newer than 22.6 build of the SDK. It will certainly build and run just fine, it just won't debug. Thanks for your help and that of @sharethl . Now I just have to figure out why I can step through the init code but as soon as I enter the window app the gdbserver shuts down because of illegal memory access. Maybe I have to build the Qt .so files from scratch with debug symbols. Not sure though.
-
@john3000 Here is the list I have. Hate cannot upload image on here.
- Android SDK Tool Rev24.3.3
- SDK Platform-tools Rev 22
- SDK Build-tools Rev 22.0.1
- SDK Build tools Rev 20
- Adnroid API 22 and 19, SDK Platform
- Extras: Android support library Rev 22.2.1
I have two ubuntu PCs, 2nd PC with SDK Platform tools 23 cannot debug, once I copied the SDK mentioned above to 2nd PC, debug working.
I have Linux-Mint , 64 bits, android-ndk-r10e. -
Hello,
after your downgrade did you have any problems with gdb?
Because if i try to step into, after a little time I receive the message:
"The gdb process has not responded to a command within 40 second(s).".
As it is really slow....Do you think that I have to downgrade/upgrade it?
I'm on Windows 10 (...tried on Ubuntu, it works perfectly)Thank you.
-
Please watch for https://bugreports.qt.io/browse/QTCREATORBUG-15032 and related bugs..