about summary refs log tree commit diff stats
path: root/miasm2/core/parse_asm.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2016-01-26 17:45:24 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2016-01-26 17:45:24 +0100
commitc1bc56754495e1c2a4176aaa486de9e58cb02a88 (patch)
tree1ca51aab9e0908e3f11b0cccc7ad7f50be349f67 /miasm2/core/parse_asm.py
parentb3fae7887d63bcdbb18b25ade6d20f152d802005 (diff)
parentd6222c4383891c6706ce70ec7750b42ee24e1cfc (diff)
downloadmiasm-c1bc56754495e1c2a4176aaa486de9e58cb02a88.tar.gz
miasm-c1bc56754495e1c2a4176aaa486de9e58cb02a88.zip
Merge pull request #309 from commial/feature-basicblocks
Feature AsmCFG
Diffstat (limited to 'miasm2/core/parse_asm.py')
-rw-r--r--miasm2/core/parse_asm.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py
index e55a9af8..aefa6df9 100644
--- a/miasm2/core/parse_asm.py
+++ b/miasm2/core/parse_asm.py
@@ -232,7 +232,7 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None):
     cur_block = None
     state = STATE_NO_BLOC
     i = 0
-    blocks = []
+    blocks = asmbloc.AsmCFG()
     block_to_nlink = None
     block_may_link = False
     delayslot = 0
@@ -261,7 +261,7 @@ def parse_txt(mnemo, attrib, txt, symbol_pool=None):
                 cur_block = asmbloc.asm_bloc(line, alignment=mnemo.alignment)
                 i += 1
             # Generate the current bloc
-            blocks.append(cur_block)
+            blocks.add_node(cur_block)
             state = STATE_IN_BLOC
             if block_to_nlink:
                 block_to_nlink.addto(