Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2019-11-25 20:12:47 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-11-27 20:36:02 +0300
commitc66c7814d0804aa6d5e018eff00b5e6d3da0dabd (patch)
tree430ba2e9ce480107862ce3cc58e9e7d3ed10c9ff /sdks/ios/appbuilder
parent18ddc2e45dd08fe0257cd1c408571d67eaeb5f4a (diff)
[sdks] Add option to enable debug server for iOS test app
Include .pdb files in iOS test app if the DEBUG variable is set and wait for managed debugger to attach.
Diffstat (limited to 'sdks/ios/appbuilder')
-rw-r--r--sdks/ios/appbuilder/appbuilder.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/sdks/ios/appbuilder/appbuilder.cs b/sdks/ios/appbuilder/appbuilder.cs
index 0df8c031903..92020047291 100644
--- a/sdks/ios/appbuilder/appbuilder.cs
+++ b/sdks/ios/appbuilder/appbuilder.cs
@@ -98,7 +98,7 @@ public class AppBuilder
string team_identifier = null;
bool isnetcore = false;
bool isdev = false;
- bool isrelease = false;
+ bool isdebug = false;
bool isllvm = false;
bool isinterponly = false;
bool isinterpmixed = false;
@@ -119,6 +119,7 @@ public class AppBuilder
{ "team-identifier=", s => team_identifier = s },
{ "llvm", s => isllvm = true },
{ "netcore", s => isnetcore = true },
+ { "debug", s => isdebug = true },
{ "interp-only", s => isinterponly = true },
{ "interp-mixed", s => isinterpmixed = true },
{ "exe=", s => exe = s },
@@ -148,9 +149,6 @@ public class AppBuilder
break;
}
- if (isllvm)
- isrelease = true;
-
string runtime = isnetcore ? "ios-netcore_target64-release" : "ios-target64-release";
string cross_runtime = isnetcore ? "ios-netcore_cross64-release" : "ios-cross64-release";
@@ -167,11 +165,16 @@ public class AppBuilder
aot_args = "full";
}
- if (!isrelease)
+ if (isdebug)
aot_args += ",soft-debug";
if (isllvm) {
cross_runtime_args = "--llvm";
aot_args += ",llvm-path=$mono_sdkdir/llvm-llvm64/bin,llvm-outfile=$llvm_outfile";
+
+ if (isdebug) {
+ Console.WriteLine ("--debug can't be used together with --llvm");
+ Environment.Exit (1);
+ }
}
Directory.CreateDirectory (builddir);
@@ -264,6 +267,12 @@ public class AppBuilder
ninja.WriteLine ($"build $appdir/{filename}: cpifdiff $builddir/{filename}");
+ string pdb = Path.ChangeExtension (assembly, ".pdb");
+ if (isdebug && File.Exists (pdb)) {
+ File.Copy (pdb, Path.Combine (builddir, filename_noext + ".pdb"), true);
+ ninja.WriteLine ($"build $appdir/{filename_noext}.pdb: cpifdiff $builddir/{filename_noext}.pdb");
+ }
+
var assembly_dir = Path.GetDirectoryName (assembly);
var resource_filename = filename.Replace (".dll", ".resources.dll");
foreach (var culture in cultures) {