diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-07-03 14:34:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-03 14:34:41 +0200 |
| commit | c0afde4d7c8ff51eaa31e4a074b9e06f080b3169 (patch) | |
| tree | 967c5856dcf37980cf80a2ea48cc7ee0e008e1bd /test/core/parse_asm.py | |
| parent | c7ca6a23768178dd49c8fe97d7c7b1e0be02cd2e (diff) | |
| parent | d314460a5a19be1f3334baedf0105d9b72fc8620 (diff) | |
| download | miasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.tar.gz miasm-c0afde4d7c8ff51eaa31e4a074b9e06f080b3169.zip | |
Merge pull request #787 from commial/feature/locationdb
LocationDB
Diffstat (limited to 'test/core/parse_asm.py')
| -rwxr-xr-x | test/core/parse_asm.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/core/parse_asm.py b/test/core/parse_asm.py index fab3a815..ddb195d2 100755 --- a/test/core/parse_asm.py +++ b/test/core/parse_asm.py @@ -64,15 +64,15 @@ class TestParseAsm(unittest.TestCase): .string "toto" ''' - asmcfg, symbol_pool = parse_txt(mn_x86, 32, ASM0) + asmcfg, loc_db = parse_txt(mn_x86, 32, ASM0) patches = asm_resolve_final(mn_x86, asmcfg, - symbol_pool) + loc_db) lbls = [] for i in xrange(6): - lbls.append(symbol_pool.getby_name('lbl%d' % i)) + lbls.append(loc_db.get_name_location('lbl%d' % i)) # align test - offset = symbol_pool.loc_key_to_offset(lbls[5]) + offset = loc_db.get_location_offset(lbls[5]) assert(offset % 0x10 == 0) lbl2block = {} for block in asmcfg.blocks: @@ -95,10 +95,10 @@ class TestParseAsm(unittest.TestCase): RET ''' - asmcfg, symbol_pool = parse_txt(mn_x86, 32, ASM0) + asmcfg, loc_db = parse_txt(mn_x86, 32, ASM0) lbls = [] for i in xrange(2): - lbls.append(symbol_pool.getby_name('lbl%d' % i)) + lbls.append(loc_db.get_name_location('lbl%d' % i)) lbl2block = {} for block in asmcfg.blocks: lbl2block[block.loc_key] = block |