port gdbserver

This commit is contained in:
Ciro Santilli
2018-08-31 15:38:07 +01:00
parent 04b878dfa7
commit e8bb30963d
3 changed files with 36 additions and 28 deletions

9
runtc
View File

@@ -1,6 +1,5 @@
#!/usr/bin/env python3
import glob
import os
import subprocess
import sys
@@ -10,10 +9,10 @@ import common
parser = common.get_argparse(argparse_args={
'description':'''Run a Buildroot ToolChain tool like readelf or objdump.
For example, to run `readelf -h` for the `arm` architecture, use:
For example, to get some information about the arm vmlinux:
....
./%(prog)s -a arm readelf -- -h
./%(prog)s readelf -- -e "$(./getvar vmlinux)"
....
Get the list of available tools with:
@@ -32,6 +31,4 @@ parser.add_argument(
nargs='*'
)
args = common.setup(parser)
paths = glob.glob(os.path.join(common.host_bin_dir, '*-buildroot-*-{}'.format(args.tool)))
assert len(paths) == 1
sys.exit(subprocess.Popen(paths + args.extra_args).wait())
sys.exit(subprocess.Popen([common.get_toolchain_tool(args.tool)] + args.extra_args).wait())