Make skydb --gdb work on mac.
R=eseidel@chromium.org TBR=eseidel@chromium.org Review URL: https://codereview.chromium.org/1155583006
This commit is contained in:
parent
1f16cbca7d
commit
e3f337f934
@ -9,6 +9,7 @@ import os
|
||||
import sys
|
||||
import subprocess
|
||||
import json
|
||||
import platform
|
||||
|
||||
|
||||
def library_paths(build_dir):
|
||||
@ -44,10 +45,14 @@ def compute_path_to_app_id_map(paths, cache, cache_mtime):
|
||||
for path in paths:
|
||||
app_id = get_cached_app_id(path, cache, cache_mtime)
|
||||
if not app_id:
|
||||
logging.info('sha256sum %s' % path)
|
||||
if platform.system() == 'Darwin':
|
||||
logging.info('shasum -a 256 %s' % path)
|
||||
output = subprocess.check_output(['shasum', '-a', '256', path])
|
||||
else:
|
||||
logging.info('sha256sum %s' % path)
|
||||
output = subprocess.check_output(['sha256sum', path])
|
||||
# Example output:
|
||||
# f82a3551478a9a0e010adccd675053b9 png_viewer.mojo
|
||||
output = subprocess.check_output(['sha256sum', path])
|
||||
app_id = output.strip().split()[0]
|
||||
path_to_app_id_map[path] = app_id
|
||||
return path_to_app_id_map
|
||||
|
@ -18,6 +18,7 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
import urlparse
|
||||
import platform
|
||||
|
||||
SUPPORTED_MIME_TYPES = [
|
||||
'text/html',
|
||||
@ -531,9 +532,14 @@ class SkyDebugger(object):
|
||||
symbol_search_paths = system_lib_dirs + symbol_search_paths
|
||||
|
||||
# TODO(eseidel): We need to look up the toolchain somehow?
|
||||
gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/'
|
||||
'toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/'
|
||||
'bin/arm-linux-androideabi-gdb')
|
||||
if platform.system() == 'Darwin':
|
||||
gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/'
|
||||
'toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/'
|
||||
'bin/arm-linux-androideabi-gdb')
|
||||
else:
|
||||
gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/'
|
||||
'toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/'
|
||||
'bin/arm-linux-androideabi-gdb')
|
||||
|
||||
# Set solib-search-path after letting android modify symbol_search_paths
|
||||
eval_commands.append(
|
||||
|
Loading…
x
Reference in New Issue
Block a user