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 sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import json
|
import json
|
||||||
|
import platform
|
||||||
|
|
||||||
|
|
||||||
def library_paths(build_dir):
|
def library_paths(build_dir):
|
||||||
@ -44,10 +45,14 @@ def compute_path_to_app_id_map(paths, cache, cache_mtime):
|
|||||||
for path in paths:
|
for path in paths:
|
||||||
app_id = get_cached_app_id(path, cache, cache_mtime)
|
app_id = get_cached_app_id(path, cache, cache_mtime)
|
||||||
if not app_id:
|
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:
|
# Example output:
|
||||||
# f82a3551478a9a0e010adccd675053b9 png_viewer.mojo
|
# f82a3551478a9a0e010adccd675053b9 png_viewer.mojo
|
||||||
output = subprocess.check_output(['sha256sum', path])
|
|
||||||
app_id = output.strip().split()[0]
|
app_id = output.strip().split()[0]
|
||||||
path_to_app_id_map[path] = app_id
|
path_to_app_id_map[path] = app_id
|
||||||
return path_to_app_id_map
|
return path_to_app_id_map
|
||||||
|
@ -18,6 +18,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import urlparse
|
import urlparse
|
||||||
|
import platform
|
||||||
|
|
||||||
SUPPORTED_MIME_TYPES = [
|
SUPPORTED_MIME_TYPES = [
|
||||||
'text/html',
|
'text/html',
|
||||||
@ -531,9 +532,14 @@ class SkyDebugger(object):
|
|||||||
symbol_search_paths = system_lib_dirs + symbol_search_paths
|
symbol_search_paths = system_lib_dirs + symbol_search_paths
|
||||||
|
|
||||||
# TODO(eseidel): We need to look up the toolchain somehow?
|
# TODO(eseidel): We need to look up the toolchain somehow?
|
||||||
gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/'
|
if platform.system() == 'Darwin':
|
||||||
'toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/'
|
gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/'
|
||||||
'bin/arm-linux-androideabi-gdb')
|
'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
|
# Set solib-search-path after letting android modify symbol_search_paths
|
||||||
eval_commands.append(
|
eval_commands.append(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user