diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index 6f80413abcf..566bfbc820c 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -34,7 +34,6 @@ #include "androidavdmanager.h" #include "androidrunnerworker.h" -#include #include #include #include @@ -42,6 +41,7 @@ #include #include +#include #include namespace { @@ -51,70 +51,6 @@ static Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner", QtW using namespace ProjectExplorer; using namespace Utils; -/* - This uses explicit handshakes between the application and the - gdbserver start and the host side by using the gdbserver socket. - - For the handshake there are two mechanisms. Only the first method works - on Android 5.x devices and is chosen as default option. The second - method can be enabled by setting the QTC_ANDROID_USE_FILE_HANDSHAKE - environment variable before starting Qt Creator. - - 1.) This method uses a TCP server on the Android device which starts - listening for incoming connections. The socket is forwarded by adb - and creator connects to it. This is the only method that works - on Android 5.x devices. - - 2.) This method uses two files ("ping" file in the application dir, - "pong" file in /data/local/tmp/qt). - - The sequence is as follows: - - host: adb forward debugsocket :5039 - - host: adb shell rm pong file - host: adb shell am start - host: loop until ping file appears - - app start up: launch gdbserver --multi +debug-socket - app start up: loop until debug socket appear - - gdbserver: normal start up including opening debug-socket, - not yet attached to any process - - app start up: 1.) set up ping connection or 2.) touch ping file - app start up: 1.) accept() or 2.) loop until pong file appears - - host: start gdb - host: gdb: set up binary, breakpoints, path etc - host: gdb: target extended-remote :5039 - - gdbserver: accepts connection from gdb - - host: gdb: attach - - gdbserver: attaches to the application - and stops it - - app start up: stopped now (it is still waiting for - the pong anyway) - - host: gdb: continue - - gdbserver: resumes application - - app start up: resumed (still waiting for the pong) - - host: 1) write "ok" to ping pong connection or 2.) write pong file - - app start up: java code continues now, the process - is already fully under control - of gdbserver. Breakpoints are set etc, - we are before main. - app start up: native code launches - -*/ - namespace Android { namespace Internal {