From 7549140abebd94760e2d331bf11a99f79241bb60 Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Sat, 5 Mar 2016 20:58:30 -0800 Subject: [PATCH] Added a 'data' style that acts as a flag to the disassmebler to not disassemble this region --- atrcopy/segments.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/atrcopy/segments.py b/atrcopy/segments.py index 473c4be..116ebf4 100755 --- a/atrcopy/segments.py +++ b/atrcopy/segments.py @@ -66,12 +66,23 @@ class DefaultSegment(object): def tostring(self): return self.data.tostring() - def get_style_bits(self, match=False, comment=False, selected=False): + def get_style_bits(self, match=False, comment=False, selected=False, data=False): + """ Return an int value that contains the specified style bits set. + + Available styles for each byte are: + + match: part of the currently matched search + comment: user commented area + selected: selected region + data: labeled in the disassembler as a data region (i.e. not disassembled) + """ style_bits = 0 if match: style_bits |= 1 if comment: style_bits |= 2 + if data: + style_bits |= 4 if selected: style_bits |= 0x80 return style_bits