diff options
Diffstat (limited to 'miasm2/core/asmbloc.py')
| -rw-r--r-- | miasm2/core/asmbloc.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py index 97f94821..a76ec8a6 100644 --- a/miasm2/core/asmbloc.py +++ b/miasm2/core/asmbloc.py @@ -306,7 +306,7 @@ class asm_block_bad(AsmBlockBad): super(asm_block_bad, self).__init__(label, alignment, *args, **kwargs) -class asm_symbol_pool: +class AsmSymbolPool(object): def __init__(self): self._labels = [] @@ -430,6 +430,13 @@ class asm_symbol_pool: return label +class asm_symbol_pool(AsmSymbolPool): + + def __init__(self): + warnings.warn('DEPRECATION WARNING: use "AsmSymbolPool" instead of "asm_symbol_pool"') + super(asm_symbol_pool, self).__init__() + + class AsmCFG(DiGraph): """Directed graph standing for a ASM Control Flow Graph with: @@ -758,7 +765,7 @@ class AsmCFG(DiGraph): In order to work, they must be only one block in @self per label in @symbol_pool (which is true if @self come from the same disasmEngine). - @symbol_pool: asm_symbol_pool instance associated with @self'labels + @symbol_pool: AsmSymbolPool instance associated with @self'labels @dis_block_callback: (optional) if set, this callback will be called on new block destinations @kwargs: (optional) named arguments to pass to dis_block_callback @@ -1328,7 +1335,7 @@ class disasmEngine(object): self.arch = arch self.attrib = attrib self.bin_stream = bin_stream - self.symbol_pool = asm_symbol_pool() + self.symbol_pool = AsmSymbolPool() self.job_done = set() # Setup options |