Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: sky/tools/skydb

Issue 1155583006: Make skydb --gdb work on mac. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/tools/mojo_cache_linker.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 from skypy.skyserver import SkyServer 6 from skypy.skyserver import SkyServer
7 import argparse 7 import argparse
8 import json 8 import json
9 import logging 9 import logging
10 import os 10 import os
11 import pipes 11 import pipes
12 import re 12 import re
13 import requests 13 import requests
14 import signal 14 import signal
15 import skypy.paths 15 import skypy.paths
16 import StringIO 16 import StringIO
17 import subprocess 17 import subprocess
18 import sys 18 import sys
19 import time 19 import time
20 import urlparse 20 import urlparse
21 import platform
21 22
22 SUPPORTED_MIME_TYPES = [ 23 SUPPORTED_MIME_TYPES = [
23 'text/html', 24 'text/html',
24 'text/sky', 25 'text/sky',
25 'text/plain', 26 'text/plain',
26 ] 27 ]
27 28
28 DEFAULT_SKY_COMMAND_PORT = 7777 29 DEFAULT_SKY_COMMAND_PORT = 7777
29 GDB_PORT = 8888 30 GDB_PORT = 8888
30 SKY_SERVER_PORT = 9999 31 SKY_SERVER_PORT = 9999
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 if 'remote_sky_server_port' in self.pids: 525 if 'remote_sky_server_port' in self.pids:
525 self._add_android_library_links(CACHE_LINKS_PATH) 526 self._add_android_library_links(CACHE_LINKS_PATH)
526 527
527 system_lib_dirs = self._pull_system_libraries(SYSTEM_LIBS_ROOT_PATH) 528 system_lib_dirs = self._pull_system_libraries(SYSTEM_LIBS_ROOT_PATH)
528 eval_commands.append( 529 eval_commands.append(
529 'set solib-absolute-prefix %s' % SYSTEM_LIBS_ROOT_PATH) 530 'set solib-absolute-prefix %s' % SYSTEM_LIBS_ROOT_PATH)
530 531
531 symbol_search_paths = system_lib_dirs + symbol_search_paths 532 symbol_search_paths = system_lib_dirs + symbol_search_paths
532 533
533 # TODO(eseidel): We need to look up the toolchain somehow? 534 # TODO(eseidel): We need to look up the toolchain somehow?
534 gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk/' 535 if platform.system() == 'Darwin':
535 'toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/' 536 gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk /'
536 'bin/arm-linux-androideabi-gdb') 537 'toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 /'
538 'bin/arm-linux-androideabi-gdb')
539 else:
540 gdb_path = os.path.join(SRC_ROOT, 'third_party/android_tools/ndk /'
541 'toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/ '
542 'bin/arm-linux-androideabi-gdb')
537 543
538 # Set solib-search-path after letting android modify symbol_search_paths 544 # Set solib-search-path after letting android modify symbol_search_paths
539 eval_commands.append( 545 eval_commands.append(
540 'set solib-search-path %s' % ':'.join(symbol_search_paths)) 546 'set solib-search-path %s' % ':'.join(symbol_search_paths))
541 547
542 exec_command = [gdb_path] 548 exec_command = [gdb_path]
543 for command in eval_commands: 549 for command in eval_commands:
544 exec_command += ['--eval-command', command] 550 exec_command += ['--eval-command', command]
545 551
546 print " ".join(exec_command) 552 print " ".join(exec_command)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 load_parser.set_defaults(func=self.load_command) 636 load_parser.set_defaults(func=self.load_command)
631 637
632 args = parser.parse_args() 638 args = parser.parse_args()
633 args.func(args) 639 args.func(args)
634 640
635 self._write_pid_file(PID_FILE_PATH, self.pids) 641 self._write_pid_file(PID_FILE_PATH, self.pids)
636 642
637 643
638 if __name__ == '__main__': 644 if __name__ == '__main__':
639 SkyDebugger().main() 645 SkyDebugger().main()
OLDNEW
« no previous file with comments | « sky/tools/mojo_cache_linker.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698