Go to file
hjk 06d4c0b2e8 Android: Implement debugging without relying on shell run-as
This uses explicit handshakes between the application and the
gdbserver start and the host side by using the gdbserver socket
and 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: touch ping file
     app start up: 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 <application-pid>

         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: 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

Change-Id: Iaa28b8664dbebc39022d1be7ff5533c52ce39715
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-05 16:26:31 +02:00
bin don't complain about missing macros in <module>version.h 2013-04-02 18:58:28 +02:00
config.tests Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
dist Merge remote-tracking branch 'origin/release' into stable 2013-04-03 15:43:39 +02:00
doc Doc: Added the Q_REVISION macro to the ignore list 2013-03-24 03:21:09 +01:00
examples Doc: Fix network/torrent example to work on Qt 5 2013-04-04 08:37:04 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Enable C++11 on OSX when using Clang 2013-04-05 14:23:23 +02:00
qmake qmake/Win: disable "find highest lib version" feature by default 2013-03-26 21:44:15 +01:00
src Android: Implement debugging without relying on shell run-as 2013-04-05 16:26:31 +02:00
tests Don't call virtual methods after the source model is destroyed. 2013-04-05 16:26:06 +02:00
tools Merge remote-tracking branch 'origin/release' into stable 2013-04-03 15:43:39 +02:00
util Special case to work around upstream bug in gl.spec 2013-04-05 00:14:45 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Long live QLockFile 2013-03-05 06:26:33 +01:00
.qmake.conf require modules to define their version 2013-03-06 18:01:13 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Enable C++11 on OSX when using Clang 2013-04-05 14:23:23 +02:00
configure.bat Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL fix links in INSTALL 2012-10-10 08:45:22 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtbase.pro create tool pri file for syncqt 2013-02-11 18:00:12 +01:00
sync.profile Hide Harfbuzz from the outer world 2013-03-13 14:46:26 +01:00