Commit 85f75878 authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw/tools: mockturtle_debug.py: add option to specify GDB listening port

parent 5ce1aa6d
...@@ -691,7 +691,7 @@ def auto_int(val): ...@@ -691,7 +691,7 @@ def auto_int(val):
return int(val, 16) return int(val, 16)
def main(): def main():
global flag_verbose, flag_keep, flag_cpu, flag_term global flag_verbose, flag_keep, flag_cpu, flag_term, gdb_port
cmds = {'status': cmd_status, cmds = {'status': cmd_status,
'demo': cmd_demo, 'demo': cmd_demo,
...@@ -724,12 +724,15 @@ def main(): ...@@ -724,12 +724,15 @@ def main():
help='PCI device id (Bus << 16) | (Dev << 8) | Func') help='PCI device id (Bus << 16) | (Dev << 8) | Func')
parser.add_argument("cmd", default=False, nargs='+', choices=cmds.keys(), parser.add_argument("cmd", default=False, nargs='+', choices=cmds.keys(),
help='The command to execute') help='The command to execute')
parser.add_argument("-p, --gdb-port", type=auto_int, required=False, dest='gdb_port', default=3000,
help='Define the listening port for GDB sessions.')
args = parser.parse_args() args = parser.parse_args()
flag_verbose = args.verbose flag_verbose = args.verbose
flag_keep = args.keep flag_keep = args.keep
flag_cpu = args.cpu flag_cpu = args.cpu
flag_term = args.term flag_term = args.term
gdb_port = args.gdb_port
if args.bus == "pci": if args.bus == "pci":
if args.device is None: if args.device is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment