diff options
author | Josh Gao <jmgao@google.com> | 2015-11-16 10:44:47 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2015-11-16 10:46:37 -0800 |
commit | a13767e64fa1d48d3f82e236763d95389d68caab (patch) | |
tree | b01751f22de863697d1e432e2929aaa958ab993a /ndk-gdb.py | |
parent | cbca676382efac5b09cc106bd05e8109bdb6b478 (diff) | |
download | ndk-a13767e64fa1d48d3f82e236763d95389d68caab.tar.gz |
ndk-gdb: make -x work.
Change-Id: I853ca330d082316482855e0a027970185215d7a6
Diffstat (limited to 'ndk-gdb.py')
-rwxr-xr-x | ndk-gdb.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ndk-gdb.py b/ndk-gdb.py index b85f6bde1..359820954 100755 --- a/ndk-gdb.py +++ b/ndk-gdb.py @@ -517,6 +517,15 @@ from printers import {pypr_fn} {pypr_fn}(None) end""".format(pypr_dir=args.pypr_dir, pypr_fn=args.pypr_fn) + if args.exec_file is not None: + try: + exec_file = open(args.exec_file, "r") + except IOError: + error("Failed to open GDB exec file: '{}'.".format(args.exec_file)) + + with exec_file: + gdb_commands += exec_file.read() + return gdb_commands |