Chromium Code Reviews| Index: mojo/devtools/common/android_gdb/session.py |
| diff --git a/mojo/devtools/common/android_gdb/session.py b/mojo/devtools/common/android_gdb/session.py |
| index e425c40e6be4e01afc01beb4fd544a1a53560675..525778039eb686dfe39eaf0b2cb6d73b4ba1ccec 100644 |
| --- a/mojo/devtools/common/android_gdb/session.py |
| +++ b/mojo/devtools/common/android_gdb/session.py |
| @@ -71,9 +71,10 @@ def _get_mapped_files(): |
| class DebugSession(object): |
| - def __init__(self, build_directory, package_name, pyelftools_dir, adb): |
| - self._build_directory = build_directory |
| - if not os.path.exists(self._build_directory): |
| + def __init__(self, build_directory_list, package_name, pyelftools_dir, adb): |
| + build_directories = build_directory_list.split(',') |
| + if len(build_directories) == 0 or not all(map(os.path.exists, |
| + build_directories)): |
| logging.fatal("Please pass a valid build directory") |
|
qsr (NOT THE RIGHT qsr)
2015/09/03 10:34:04
The message might need to be changed, no?
etiennej
2015/09/03 11:45:44
Done.
|
| sys.exit(1) |
| self._package_name = package_name |
| @@ -92,7 +93,7 @@ class DebugSession(object): |
| self._elffile_module = elffile |
| - self._libraries = self._find_libraries(build_directory) |
| + self._libraries = self._find_libraries(build_directories) |
| self._rfc = RemoteFileConnection('localhost', 10000) |
| self._remote_file_reader_process = None |
| if not os.path.exists(self._remote_file_cache): |
| @@ -111,15 +112,16 @@ class DebugSession(object): |
| if self._remote_file_reader_process != None: |
| self._remote_file_reader_process.kill() |
| - def _find_libraries(self, lib_dir): |
| - """Finds all libraries in |lib_dir| and key them by their signatures. |
| + def _find_libraries(self, lib_dirs): |
| + """Finds all libraries in |lib_dirs| and key them by their signatures. |
| """ |
| res = {} |
| - for fn in glob.glob('%s/*.so' % lib_dir): |
| - with open(fn, 'r') as f: |
| - s = get_signature(f, self._elffile_module) |
| - if s is not None: |
| - res[s] = fn |
| + for lib_dir in lib_dirs: |
| + for fn in glob.glob('%s/*.so' % lib_dir): |
| + with open(fn, 'r') as f: |
| + s = get_signature(f, self._elffile_module) |
| + if s is not None: |
| + res[s] = fn |
| return res |
| def _associate_symbols(self, mapping, local_file): |