aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/devenv_commands.py
diff options
context:
space:
mode:
authorJosh Brudnak <jobrud314@gmail.com>2018-08-10 13:11:23 -0400
committerGitHub <noreply@github.com>2018-08-10 13:11:23 -0400
commit230f025bc73f031ae6b1dfe9c5397754a4c3a649 (patch)
treebaafd77163b22d08dbabbb78a381e117288754ab /python/servo/devenv_commands.py
parentfc0a86c038f54d90c34da63bcf7a6750e8092b72 (diff)
parente40feab22f7af65def5c5827313ce48a526d309a (diff)
downloadservo-230f025bc73f031ae6b1dfe9c5397754a4c3a649.tar.gz
servo-230f025bc73f031ae6b1dfe9c5397754a4c3a649.zip
Merge branch 'master' into master
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r--python/servo/devenv_commands.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index c61a5f781e5..f6532b57097 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -14,6 +14,7 @@ from time import time
import sys
import urllib2
import json
+import subprocess
from mach.decorators import (
CommandArgument,
@@ -227,7 +228,7 @@ class MachCommands(CommandBase):
with cd(self.context.topdir):
return self.call_rustup_run(["cargo", "fetch"], env=self.build_env())
-
+
@Command('rustfmt',
description='Format the Rust code using Cargo fmt',
category='devenv')
@@ -240,3 +241,26 @@ class MachCommands(CommandBase):
with cd(self.context.topdir):
return self.call_rustup_run(["cargo", "fmt", "--", directory], env=self.build_env())
+
+ @Command('ndk-stack',
+ description='Invoke the ndk-stack tool with the expected symbol paths',
+ category='devenv')
+ @CommandArgument('--release', action='store_true', help="Use release build symbols")
+ @CommandArgument('--target', action='store', default="armv7-linux-androideabi",
+ help="Build target")
+ @CommandArgument('logfile', action='store', help="Path to logcat output with crash report")
+ def stack(self, release, target, logfile):
+ if not path.isfile(logfile):
+ print(logfile + " doesn't exist")
+ return -1
+ env = self.build_env(target=target)
+ ndk_stack = path.join(env["ANDROID_NDK"], "ndk-stack")
+ sym_path = path.join(
+ "target",
+ target,
+ "release" if release else "debug",
+ "apk",
+ "obj",
+ "local",
+ "armeabi-v7a")
+ print(subprocess.check_output([ndk_stack, "-sym", sym_path, "-dump", logfile]))