diff options
author | Graydon, Tracy <tracy.graydon@intel.com> | 2013-01-31 15:14:28 -0800 |
---|---|---|
committer | Graydon, Tracy <tracy.graydon@intel.com> | 2013-01-31 15:14:28 -0800 |
commit | 3c7b03f2f7b4ecfb18fb30f2e43b6321cb1aa4de (patch) | |
tree | bb8c57f401c0087a3ce4e96dc733abff854c3a43 /scripts/convert_itp.py | |
download | intel-gpu-tools-2.0alpha.tar.gz intel-gpu-tools-2.0alpha.tar.bz2 intel-gpu-tools-2.0alpha.zip |
Initial commitHEADsubmit/2.0alpha/20130131.232756accepted/2.0alpha/20130131.230204accepted/tizen_genericaccepted/tizen_common2.0alpha
Diffstat (limited to 'scripts/convert_itp.py')
-rwxr-xr-x | scripts/convert_itp.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/convert_itp.py b/scripts/convert_itp.py new file mode 100755 index 00000000..4474f34d --- /dev/null +++ b/scripts/convert_itp.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +#this script helps to convert internal debugger scripts given to us into our tools + +import sys +import fileinput + +def replace_with_dict(text, dicto): + for key, val in dicto.items(): + text = text.replace(key, val) + return text + +for lines in fileinput.input([sys.argv[1]], inplace=True): + lines = lines.strip() + if lines == '': continue # strip empty lines + replace_dict = {'dword(' : '../tools/intel_reg_read ', 'MMADDR + ' : '', '//' : '#', ')p;' : '', ')p ' : ' -c '} + print(replace_with_dict(lines, replace_dict)) |