Lines Matching refs:args
114 def handle_switches(args, sysroot): argument
126 device = args.device
131 args.su_cmd = ["su", args.user] if args.user else []
133 if args.target_pid:
135 pid = args.target_pid
136 elif args.target_name:
138 pid = get_remote_pid(device, args.target_name)
139 elif args.run_cmd:
140 if not args.run_cmd[0]:
142 run_cmd = args.run_cmd
145 run_cmd[0] = gdbrunner.find_executable_path(device, args.run_cmd[0],
146 run_as_cmd=args.su_cmd)
149 "please provide an absolute path.".format(args.run_cmd[0]))
152 run_as_cmd=args.su_cmd)
157 run_as_cmd=args.su_cmd)
286 args = parse_args()
287 device = args.device
303 binary_file, pid, run_cmd = handle_switches(args, sysroot)
314 cmd_prefix = args.su_cmd
315 if args.env:
316 cmd_prefix += ['env'] + [v[0] for v in args.env]
324 port=args.port, run_as_cmd=cmd_prefix)
326 print "Connecting to tracing pid {} using local port {}".format(tracer_pid, args.port)
327 gdbrunner.forward_gdbserver_port(device, local=args.port,
328 remote="tcp:{}".format(args.port))
345 port=args.port,
346 debugger=args.setup_forwarding or "gdb")
348 if not args.setup_forwarding:
358 if args.setup_forwarding == "vscode":