main.py (5472:5df361e08b81) main.py (5473:47c5168d092c)
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

--- 102 unchanged lines hidden (view full) ---

111 help="Sets the flags for tracing (-FLAG disables a flag)")
112add_option("--trace-start", metavar="TIME", type='int',
113 help="Start tracing at TIME (must be in ticks)")
114add_option("--trace-file", metavar="FILE", default="cout",
115 help="Sets the output file for tracing [Default: %default]")
116add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
117 help="Ignore EXPR sim objects")
118
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

--- 102 unchanged lines hidden (view full) ---

111 help="Sets the flags for tracing (-FLAG disables a flag)")
112add_option("--trace-start", metavar="TIME", type='int',
113 help="Start tracing at TIME (must be in ticks)")
114add_option("--trace-file", metavar="FILE", default="cout",
115 help="Sets the output file for tracing [Default: %default]")
116add_option("--trace-ignore", metavar="EXPR", action='append', split=':',
117 help="Ignore EXPR sim objects")
118
119# Help options
120set_group("Help Options")
121add_option("--list-sim-objects", action='store_true', default=False,
122 help="List all built-in SimObjects, their parameters and default values")
123
119def main():
120 import defines
121 import event
122 import info
123 import internal
124
125 # load the options.py config file to allow people to set their own
126 # default options

--- 55 unchanged lines hidden (view full) ---

182 print "Compound Flags:"
183 for flag in traceflags.compoundFlags:
184 if flag == 'All':
185 continue
186 print " %s:" % flag
187 print_list(traceflags.compoundFlagMap[flag], indent=8)
188 print
189
124def main():
125 import defines
126 import event
127 import info
128 import internal
129
130 # load the options.py config file to allow people to set their own
131 # default options

--- 55 unchanged lines hidden (view full) ---

187 print "Compound Flags:"
188 for flag in traceflags.compoundFlags:
189 if flag == 'All':
190 continue
191 print " %s:" % flag
192 print_list(traceflags.compoundFlagMap[flag], indent=8)
193 print
194
195 if options.list_sim_objects:
196 import SimObject
197 done = True
198 print "SimObjects:"
199 objects = SimObject.allClasses.keys()
200 objects.sort()
201 for name in objects:
202 obj = SimObject.allClasses[name]
203 print " %s" % obj
204 params = obj._params.keys()
205 params.sort()
206 for pname in params:
207 param = obj._params[pname]
208 default = getattr(param, 'default', '')
209 print " %s" % pname
210 if default:
211 print " default: %s" % default
212 print " desc: %s" % param.desc
213 print
214 print
215
190 if done:
191 sys.exit(0)
192
193 # setting verbose and quiet at the same time doesn't make sense
194 if options.verbose > 0 and options.quiet > 0:
195 options.usage(2)
196
197 verbose = options.verbose - options.quiet

--- 107 unchanged lines hidden ---
216 if done:
217 sys.exit(0)
218
219 # setting verbose and quiet at the same time doesn't make sense
220 if options.verbose > 0 and options.quiet > 0:
221 options.usage(2)
222
223 verbose = options.verbose - options.quiet

--- 107 unchanged lines hidden ---