From bc6e46cce9e2f6e4555a2c6cff1521a522156c6d Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Mon, 13 Jul 2009 16:56:36 +0200 Subject: *tools/trace: * Added the possibility to add a callback file containing the function to decode traces. See the example/trace.trc to use it, the file containing the callback must be provided using the -c option in the interpretor. --- tools/trace/trace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/trace/trace.py') diff --git a/tools/trace/trace.py b/tools/trace/trace.py index b4010a25..e6a2c756 100644 --- a/tools/trace/trace.py +++ b/tools/trace/trace.py @@ -24,6 +24,8 @@ parser.add_option("-l", "--list", dest="list_trace", action="store_true", help="List the number of the traces" + INTER_MODE) parser.add_option("-n", "--num", type="int", dest="trace", help="Dump the trace number provided" + INTER_MODE) +parser.add_option("-c", "--callback", dest="cb", + help="The callback file containing the functions" + INTER_MODE) [options, args] = parser.parse_args() @@ -31,7 +33,7 @@ if options.type == 'create': cre = TCreator (options.infile, options.outfile, options.enum_name) cre.create () elif options.type == "inter": - inter = TInter (options.infile, options.outfile, args[0]) + inter = TInter (options.infile, options.outfile, args[0], options.cb) if options.list_trace: inter.available_traces () elif options.trace != None: -- cgit v1.2.3