summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kdab.com>2017-04-21 16:37:18 +0300
committerBogDan Vatra <bogdan@kdab.com>2017-04-25 11:04:49 +0000
commita4f656126803b6cfac8ac4b442ee975562145b73 (patch)
treea66cacf9494d71929b327a4a83ac4fec1070690b
parent64e99958f358003092cdf455eec89c08cf3b6fd1 (diff)
Write debugger command to assets
Change-Id: I0a8e44106aa3ada8267438c173c2d8dfe9f511e6 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit cf291537ab218cd93c87675f693abed473065468)
-rw-r--r--src/androiddeployqt/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
index 48efae233..1ffbd53fb 100644
--- a/src/androiddeployqt/main.cpp
+++ b/src/androiddeployqt/main.cpp
@@ -2773,6 +2773,19 @@ bool copyGdbServer(const Options &options)
return false;
}
+ QString addedByAndroidDeployQtPath = options.outputDirectory + QLatin1String("/assets/--Added-by-androiddeployqt--/");
+ if (!QDir().mkpath(addedByAndroidDeployQtPath)) {
+ fprintf(stderr, "Failed to create directory '%s'", qPrintable(addedByAndroidDeployQtPath));
+ return false;
+ }
+ QFile f(addedByAndroidDeployQtPath + QLatin1String("debugger.command"));
+ if (!f.open(QIODevice::WriteOnly)) {
+ fprintf(stderr, "Failed to create directory '%s'", qPrintable(addedByAndroidDeployQtPath));
+ return false;
+ }
+ f.write("lib/libgdbserver.so --multi +");
+ f.close();
+
return true;
}