06d4c0b2e8
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> |
||
---|---|---|
bin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
tools | ||
util | ||
.gitattributes | ||
.gitignore | ||
.qmake.conf | ||
.tag | ||
configure | ||
configure.bat | ||
header.BSD | ||
header.FDL | ||
header.LGPL | ||
header.LGPL-ONLY | ||
INSTALL | ||
LGPL_EXCEPTION.txt | ||
LICENSE.FDL | ||
LICENSE.GPL | ||
LICENSE.LGPL | ||
LICENSE.PREVIEW.COMMERCIAL | ||
qtbase.pro | ||
sync.profile |