about summary refs log tree commit diff stats
path: root/miasm2/arch/msp430/arch.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-07-02 19:12:53 +0200
committerAjax <commial@gmail.com>2018-07-03 14:28:18 +0200
commitd314460a5a19be1f3334baedf0105d9b72fc8620 (patch)
tree967c5856dcf37980cf80a2ea48cc7ee0e008e1bd /miasm2/arch/msp430/arch.py
parent68fac2e86cc61eba9adfe520fa0e04a7e8943450 (diff)
downloadmiasm-d314460a5a19be1f3334baedf0105d9b72fc8620.tar.gz
miasm-d314460a5a19be1f3334baedf0105d9b72fc8620.zip
Update symbol_pool's deprecated API -> LocationDB
Diffstat (limited to 'miasm2/arch/msp430/arch.py')
-rw-r--r--miasm2/arch/msp430/arch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm2/arch/msp430/arch.py b/miasm2/arch/msp430/arch.py
index 7c739561..ecf4cb13 100644
--- a/miasm2/arch/msp430/arch.py
+++ b/miasm2/arch/msp430/arch.py
@@ -69,7 +69,7 @@ class msp430_arg(m_arg):
                 index = gpregs.str.index(name)
                 reg = gpregs.expr[index]
                 return reg
-            loc_key = loc_db.getby_name_create(value.name)
+            loc_key = loc_db.get_or_create_name_location(value.name)
             return ExprLoc(loc_key, 16)
         if isinstance(value, AstOp):
             args = [self.asm_ast_to_expr(tmp, loc_db) for tmp in value.args]
@@ -109,7 +109,7 @@ class instruction_msp430(instruction):
             o = str(expr)
         elif expr.is_loc():
             if loc_db is not None:
-                return loc_db.str_loc_key(expr.loc_key)
+                return loc_db.pretty_str(expr.loc_key)
             else:
                 return str(expr)
         elif isinstance(expr, ExprOp) and expr.op == "autoinc":
@@ -138,7 +138,7 @@ class instruction_msp430(instruction):
         else:
             addr = expr.arg + int(self.offset)
 
-        loc_key = loc_db.getby_offset_create(addr)
+        loc_key = loc_db.get_or_create_offset_location(addr)
         self.args[0] = ExprLoc(loc_key, expr.size)
 
     def breakflow(self):