Skip to content

Commit

Permalink
ndk-gdb.py: fix gdb script on windows.
Browse files Browse the repository at this point in the history
Bug: #46
Change-Id: Icd08775a6932f88a360e827aa1e09df84678b074
(cherry picked from commit aa605ad)
  • Loading branch information
jmgao committed Mar 28, 2016
1 parent 1998c52 commit 7ce5315
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ndk-gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,13 @@ def pull_binaries(device, out_dir, app_64bit):
device.pull("/system/bin/app_process", destination)

def generate_gdb_script(args, sysroot, binary_path, app_64bit, connect_timeout=5):
gdb_commands = "file '{}'\n".format(binary_path)
if sys.platform.startswith("win"):
# GDB expects paths to use forward slashes.
sysroot = sysroot.replace("\\", "/")
binary_path = binary_path.replace("\\", "/")

gdb_commands = "set osabi GNU/Linux\n"
gdb_commands += "file '{}'\n".format(binary_path)

solib_search_path = [sysroot, "{}/system/bin".format(sysroot)]
if app_64bit:
Expand Down

0 comments on commit 7ce5315

Please sign in to comment.