summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-01-06 15:06:01 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-06 20:58:28 +0100
commit702bda5cc9138d31cfe6ed25ead2edfda1fa623d (patch)
tree6ad88212d98d1f3df2e74c3b08a502e2213300cd /src/plugins
parente48aa2a4027d52f8ca3eed5087e8438d0f931518 (diff)
iOS: Use in-place string renaming to rename main() instead of ld
Processing the object file with ld strips away debug information for the main() function, resulting in the debugger not being able to break on specific lines of the function. It also causes issues when externing sybols in main's object file. We revert back to the approach of using the strings in-line in the object file (which is why we keep the name the same length, 'qtmn'). Task-number: QTBUG-35553 Change-Id: I8b0acee36f48ecfefa2e4fd008a842365713d985 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/ios/qioseventdispatcher.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qioseventdispatcher.mm b/src/plugins/platforms/ios/qioseventdispatcher.mm
index f93c6cc3a7..821599d113 100644
--- a/src/plugins/platforms/ios/qioseventdispatcher.mm
+++ b/src/plugins/platforms/ios/qioseventdispatcher.mm
@@ -246,7 +246,7 @@ enum SetJumpResult
// user our main wrapper. Since the symbol is weak, it will not
// get used or cause a clash in the normal Qt application usecase,
// where we rename main to qt_main.
-extern "C" int __attribute__((weak)) qt_main(int argc, char *argv[])
+extern "C" int __attribute__((weak)) qtmn(int argc, char *argv[])
{
Q_UNUSED(argc);
Q_UNUSED(argv);
@@ -265,7 +265,7 @@ static void __attribute__((noinline, noreturn)) user_main_trampoline()
strcpy(argv[i], [arg cStringUsingEncoding:[NSString defaultCStringEncoding]]);
}
- int exitCode = qt_main(argc, argv);
+ int exitCode = qtmn(argc, argv);
delete[] argv;
qEventDispatcherDebug() << "Returned from main with exit code " << exitCode;