diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2021-12-02 08:39:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-02 08:39:18 +0100 |
| commit | 0cd2cad02dd1b300d61bdc985b09de65f92261b4 (patch) | |
| tree | 7b2f0f0d5d933d807be7b57f331de5a0431cbc67 /miasm/core/asmblock.py | |
| parent | ea5abb5090ef0c8fac2ddde6f99f6f3c4fff432c (diff) | |
| parent | b9c8746116de2b223d441a90f783f8c16ab876c3 (diff) | |
| download | focaccia-miasm-0cd2cad02dd1b300d61bdc985b09de65f92261b4.tar.gz focaccia-miasm-0cd2cad02dd1b300d61bdc985b09de65f92261b4.zip | |
Merge pull request #1400 from serpilliere/color_ircfg
Colorize ir/asm
Diffstat (limited to 'miasm/core/asmblock.py')
| -rw-r--r-- | miasm/core/asmblock.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/miasm/core/asmblock.py b/miasm/core/asmblock.py index 47bffb34..e92034fe 100644 --- a/miasm/core/asmblock.py +++ b/miasm/core/asmblock.py @@ -35,6 +35,9 @@ class AsmRaw(object): def to_string(self, loc_db): return str(self) + def to_html(self, loc_db): + return str(self) + class AsmConstraint(object): c_to = "c_to" @@ -439,6 +442,9 @@ class AsmCFG(DiGraph): # between the two graphs self.add_edge(*edge, constraint=graph.edges2constraint[edge]) + def escape_text(self, text): + return text + def node2lines(self, node): loc_key_name = self.loc_db.pretty_str(node) @@ -462,9 +468,9 @@ class AsmCFG(DiGraph): if self._dot_offset: yield [self.DotCellDescription(text="%.8X" % line.offset, attr={}), - self.DotCellDescription(text=line.to_string(self.loc_db), attr={})] + self.DotCellDescription(text=line.to_html(self.loc_db), attr={})] else: - yield self.DotCellDescription(text=line.to_string(self.loc_db), attr={}) + yield self.DotCellDescription(text=line.to_html(self.loc_db), attr={}) def node_attr(self, node): block = self._loc_key_to_block.get(node, None) |