summaryrefslogtreecommitdiff
path: root/scripts/tracetool.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tracetool.py')
-rwxr-xr-xscripts/tracetool.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index 5f4890f3a..21451d29c 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -16,9 +16,9 @@ __email__ = "stefanha@linux.vnet.ibm.com"
import sys
import getopt
-from tracetool import error_write, out
-import tracetool.backend
-import tracetool.format
+from tracetool import error_write, out,generate,TracetoolError
+from tracetool import backend
+from tracetool import format
_SCRIPT = ""
@@ -28,9 +28,9 @@ def error_opt(msg = None):
error_write("Error: " + msg + "\n")
backend_descr = "\n".join([ " %-15s %s" % (n, d)
- for n,d in tracetool.backend.get_list() ])
+ for n,d in backend.get_list() ])
format_descr = "\n".join([ " %-15s %s" % (n, d)
- for n,d in tracetool.format.get_list() ])
+ for n,d in format.get_list() ])
error_write("""\
Usage: %(script)s --format=<format> --backend=<backend> [<options>]
@@ -90,7 +90,7 @@ def main(args):
arg_format = arg
elif opt == "--list-backends":
- public_backends = tracetool.backend.get_list(only_public = True)
+ public_backends = backend.get_list(only_public = True)
out(", ".join([ b for b,_ in public_backends ]))
sys.exit(0)
elif opt == "--check-backend":
@@ -112,7 +112,7 @@ def main(args):
error_opt("backend not set")
if check_backend:
- if tracetool.backend.exists(arg_backend):
+ if backend.exists(arg_backend):
sys.exit(0)
else:
sys.exit(1)
@@ -129,9 +129,9 @@ def main(args):
probe_prefix = ".".join([ "qemu", target_type, target_name ])
try:
- tracetool.generate(sys.stdin, arg_format, arg_backend,
+ generate(sys.stdin, arg_format, arg_backend,
binary = binary, probe_prefix = probe_prefix)
- except tracetool.TracetoolError, e:
+ except TracetoolError, e:
error_opt(str(e))
if __name__ == "__main__":