diff options
author | jistone <jistone> | 2006-03-14 01:00:34 +0000 |
---|---|---|
committer | jistone <jistone> | 2006-03-14 01:00:34 +0000 |
commit | 3519ee2a4a1bd00afe919b24628220711cdfc5ab (patch) | |
tree | 60c24352ef88b663d7559d9843f9745c9bd5af08 /safety/safety.py | |
parent | 62efd5e271d742d082975a3775b63d65df0dfd4e (diff) | |
download | systemtap-steved-3519ee2a4a1bd00afe919b24628220711cdfc5ab.tar.gz systemtap-steved-3519ee2a4a1bd00afe919b24628220711cdfc5ab.tar.xz systemtap-steved-3519ee2a4a1bd00afe919b24628220711cdfc5ab.zip |
2006-03-13 Josh Stone <joshua.i.stone@intel.com>
* safety/safety.py: Support IA64 disassembly matching.
* safety/data/opcodes-ia64: new opcode rules for IA64.
* safety/data/references: Add references used by example scripts
when compiled for IA64.
Diffstat (limited to 'safety/safety.py')
-rwxr-xr-x | safety/safety.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/safety/safety.py b/safety/safety.py index f02c30b3..8607ce75 100755 --- a/safety/safety.py +++ b/safety/safety.py @@ -173,8 +173,13 @@ class StaticSafety: skip_ud2a = [0] ignore_re = compile(r'^$|^\s+\.{3}$|^.*Disassembly of section|^.*file format') - opc = r'(?:(?:lock )|(?:repn?[ze]? )|(?:rex\w+ ))*(\w+)\b' - opc_re = compile(r'^[A-Fa-f\d]+ <([^>]+)> %s' % opc) + if self.__arch == 'ia64': + opc = r'(?:\[[IBFLMX]{3}\]\s+)?(?:\(p\d\d\)\s+)?([\w.]+)\b' + elif self.__arch == 'x86_64' or self.__arch == 'i686': + opc = r'(?:lock\s+)?|(?:repn?[ze]?\s+)?|(?:rex\w+\s+)?(\w+)\b' + else: + opc = r'(\w+)\b' + opc_re = compile(r'^[A-Fa-f\d]+\s+<([^>]+)>\s+%s' % opc) def check(line): m = ignore_re.match(line) if m: |