Permalink
Browse files

sh2.py (CodeField.generate_comments): add comments to help identify w…

…ord- and byte-length values, as well as longs.
  • Loading branch information...
1 parent 63be5b7 commit cea9838ae0165b272fba58dff78ac69c58b7406d @logic committed May 3, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 sh2.py
View
5 sh2.py
@@ -132,7 +132,10 @@ def generate_comments(self):
t2label = '0x%X' % meta.extra
comments.append('[%s] = %s' % (label, t2label))
elif 'label' not in self.extra.text:
- comments.append(label)
+ if isinstance(meta, WordField) or isinstance(meta, ByteField):
+ comments.append('[%s] = 0x%X' % (label, meta.extra))
+ else:
+ comments.append(label)
return comments

0 comments on commit cea9838

Please sign in to comment.