aboutsummaryrefslogtreecommitdiff
path: root/ndk-gdb.py
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2015-11-13 11:08:01 -0800
committerJosh Gao <jmgao@google.com>2015-11-13 11:08:01 -0800
commit7e3cdbeb4fed367bccd19a43e5bca3182389f8ad (patch)
tree7f49389a6746c8b51f199322daa657257a8f24f6 /ndk-gdb.py
parentdc09de8f919d1a37a3fee1b8368d9d95af9a85e9 (diff)
downloadndk-7e3cdbeb4fed367bccd19a43e5bca3182389f8ad.tar.gz
ndk-gdb.py: fix library pulling.
Change-Id: I7213f3b47d12448fe1eeacf0743ee58d52fbfdf7
Diffstat (limited to 'ndk-gdb.py')
-rwxr-xr-xndk-gdb.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ndk-gdb.py b/ndk-gdb.py
index a5cf49f9a..a07c65937 100755
--- a/ndk-gdb.py
+++ b/ndk-gdb.py
@@ -462,15 +462,16 @@ def pull_binaries(device, out_dir, is64bit):
library_path = "/system/lib"
for library in libraries:
- posixpath.join(library_path, library)
+ required_files.append(posixpath.join(library_path, library))
for required_file in required_files:
- local_name = os.path.join(out_dir, required_file)
- dirname = os.path.dirname(required_file)
- local_dirname = os.path.join(out_dir, dirname)
+ # os.path.join not used because joining absolute paths will pick the last one
+ local_path = os.path.realpath(out_dir + required_file)
+ local_dirname = os.path.dirname(local_path)
if not os.path.isdir(local_dirname):
os.makedirs(local_dirname)
- device.pull(required_file, local_name)
+ log("Pulling '{}' to '{}'".format(required_file, local_path))
+ device.pull(required_file, local_path)
def generate_gdb_script(sysroot, binary_path, is64bit, port,