Index: sky/tools/skydb |
diff --git a/sky/tools/skydb b/sky/tools/skydb |
index eb13caab5e1713698fbf16f1adab368dfb55ca58..6e0f300d7e2d0a068aec8ca1a9a1467f289f6c68 100755 |
--- a/sky/tools/skydb |
+++ b/sky/tools/skydb |
@@ -40,7 +40,6 @@ DEFAULT_URL = "https://raw.githubusercontent.com/domokit/mojo/master/sky/example |
ANDROID_PACKAGE = "org.chromium.mojo.shell" |
ANDROID_ACTIVITY = "%s/.MojoShellActivity" % ANDROID_PACKAGE |
-CACHE_LINKS_PATH = '/tmp/mojo_cache_links' |
SYSTEM_LIBS_ROOT_PATH = '/tmp/device_libs' |
@@ -311,8 +310,6 @@ class SkyDebugger(object): |
subprocess.call(['adb', 'forward', '--remove', port_string]) |
self.pids = {} # Clear out our pid file. |
- self._kill_if_exists('mojo_cache_linker_pid', 'mojo cache linker') |
- |
def load_command(self, args): |
if not urlparse.urlparse(args.url_or_path).scheme: |
# The load happens on the remote device, use the remote port. |
@@ -425,29 +422,6 @@ class SkyDebugger(object): |
] |
subprocess.call(['adb', 'logcat', '-d', '-s'] + TAGS) |
- def _start_mojo_cache_linker(self, links_path): |
- self._kill_if_exists('mojo_cache_linker_pid', 'mojo cache linker') |
- |
- if not os.path.exists(links_path): |
- os.makedirs(links_path) |
- shell_link_path = os.path.join(links_path, 'libmojo_shell.so') |
- if os.path.lexists(shell_link_path): |
- os.unlink(shell_link_path) |
- os.symlink(self.paths.mojo_shell_path, shell_link_path) |
- |
- logcat_cmd = ['adb', 'logcat'] |
- logcat = subprocess.Popen(logcat_cmd, stdout=subprocess.PIPE) |
- |
- mojo_cache_linker_path = os.path.join( |
- self.paths.sky_tools_directory, 'mojo_cache_linker.py') |
- cache_linker_cmd = [ |
- mojo_cache_linker_path, |
- links_path, |
- self.pids['build_dir'], |
- 'http://localhost:%s' % self.pids['remote_sky_server_port'] |
- ] |
- return subprocess.Popen(cache_linker_cmd, stdin=logcat.stdout).pid |
- |
def _pull_system_libraries(self, system_libs_root): |
# Pull down the system libraries this pid has already mapped in. |
# TODO(eseidel): This does not handle dynamic loads. |
@@ -466,10 +440,14 @@ class SkyDebugger(object): |
'-type', 'd', |
]).strip().split('\n') |
- |
def gdb_attach_command(self, args): |
self.paths = self._create_paths_for_build_dir(self.pids['build_dir']) |
+ # FIXME: The build system should keep this updated instead. |
+ build_id_script_path = os.path.join( |
+ self.paths.sky_tools_directory, 'update_build_id_tree.py') |
+ subprocess.check_call([build_id_script_path, self.paths.build_dir]) |
+ |
symbol_search_paths = [self.pids['build_dir']] |
gdb_path = '/usr/bin/gdb' |
@@ -477,19 +455,16 @@ class SkyDebugger(object): |
'file %s' % self.paths.mojo_shell_path, |
'directory %s' % self.paths.src_root, |
'target remote localhost:%s' % GDB_PORT, |
+ 'set debug-file-directory %s' % self.paths.build_dir, |
] |
# A bunch of extra work is needed for android: |
if 'remote_sky_server_port' in self.pids: |
- pid = self._start_mojo_cache_linker(CACHE_LINKS_PATH) |
- self.pids['mojo_cache_linker_pid'] = pid |
- |
system_lib_dirs = self._pull_system_libraries(SYSTEM_LIBS_ROOT_PATH) |
init_commands.append( |
'set solib-absolute-prefix %s' % SYSTEM_LIBS_ROOT_PATH) |
symbol_search_paths = system_lib_dirs + symbol_search_paths |
- symbol_search_paths.append(CACHE_LINKS_PATH) |
# TODO(eseidel): We need to look up the toolchain somehow? |
gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/' |