1# Copyright (c) 2005 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 81 unchanged lines hidden (view full) --- 90 option("--json-config", metavar="FILE", default="config.json", 91 help="Create JSON output of the configuration [Default: %default]") 92 option("--dot-config", metavar="FILE", default="config.dot", 93 help="Create DOT & pdf outputs of the configuration [Default: %default]") 94 95 # Debugging options 96 group("Debugging Options") 97 option("--debug-break", metavar="TIME[,TIME]", action='append', split=',', |
98 help="Tick to create a breakpoint") |
99 option("--debug-help", action='store_true', |
100 help="Print help on debug flags") |
101 option("--debug-flags", metavar="FLAG[,FLAG]", action='append', split=',', |
102 help="Sets the flags for debug output (-FLAG disables a flag)") 103 option("--debug-start", metavar="TIME", type='int', 104 help="Start debug output at TIME (must be in ticks)") 105 option("--debug-file", metavar="FILE", default="cout", 106 help="Sets the output file for debug [Default: %default]") 107 option("--debug-ignore", metavar="EXPR", action='append', split=':', 108 help="Ignore EXPR sim objects") |
109 option("--remote-gdb-port", type='int', default=7000, 110 help="Remote gdb base port (set to 0 to disable listening)") 111 |
112 # Help options 113 group("Help Options") 114 option("--list-sim-objects", action='store_true', default=False, 115 help="List all built-in SimObjects, their params and default values") 116 117 # load the options.py config file to allow people to set their own 118 # default options 119 options_file = config.get('options.py') --- 188 unchanged lines hidden (view full) --- 308 sys.path[0:0] = options.path 309 310 # set stats options 311 stats.initText(options.stats_file) 312 313 # set debugging options 314 debug.setRemoteGDBPort(options.remote_gdb_port) 315 for when in options.debug_break: |
316 debug.schedBreak(int(when)) |
317 318 if options.debug_flags: 319 check_tracing() 320 321 on_flags = [] 322 off_flags = [] 323 for flag in options.debug_flags: 324 off = False --- 5 unchanged lines hidden (view full) --- 330 print >>sys.stderr, "invalid debug flag '%s'" % flag 331 sys.exit(1) 332 333 if off: 334 debug.flags[flag].disable() 335 else: 336 debug.flags[flag].enable() 337 |
338 if options.debug_start: |
339 check_tracing() |
340 e = event.create(trace.enable, event.Event.Debug_Enable_Pri) 341 event.mainq.schedule(e, options.debug_start) |
342 else: 343 trace.enable() 344 |
345 trace.output(options.debug_file) |
346 |
347 for ignore in options.debug_ignore: |
348 check_tracing() 349 trace.ignore(ignore) 350 351 sys.argv = arguments 352 sys.path = [ os.path.dirname(sys.argv[0]) ] + sys.path 353 354 filename = sys.argv[0] 355 filedata = file(filename, 'r').read() --- 45 unchanged lines hidden --- |