config: added cmd options to control ruby debug
authorBrad Beckmann <Brad.Beckmann@amd.com>
Fri, 20 Aug 2010 18:46:13 +0000 (11:46 -0700)
committerBrad Beckmann <Brad.Beckmann@amd.com>
Fri, 20 Aug 2010 18:46:13 +0000 (11:46 -0700)
configs/ruby/Ruby.py

index 2e46dd352ba98515cbfa5c277e4d4263fad4f5f8..ec1f4edf604631db6ea1347385c5cb934be9cd96 100644 (file)
@@ -48,6 +48,10 @@ def define_options(parser):
     parser.add_option("--use-map", action="store_true", default=False)
     parser.add_option("--map-levels", type="int", default=4)
 
+    # ruby debug cmd line options
+    parser.add_option("--ruby-debug", action="store_true", default=False)
+    parser.add_option("--ruby-debug-cycle", type="int", default=1)
+
     protocol = buildEnv['PROTOCOL']
     exec "import %s" % protocol
     eval("%s.define_options(parser)" % protocol)
@@ -103,7 +107,8 @@ def create_system(options, system, piobus = None, dma_devices = []):
                       tracer = RubyTracer(),
                       debug = RubyDebug(filter_string = 'none',
                                         verbosity_string = 'none',
-                                        protocol_trace = False),
+                                        protocol_trace = options.ruby_debug,
+                                        start_time = options.ruby_debug_cycle),
                       mem_size = total_mem_size)
 
     ruby.cpu_ruby_ports = cpu_sequencers