Skip to content

Commit

Permalink
Use pyvex Lifter.lift instead of _lift
Browse files Browse the repository at this point in the history
  • Loading branch information
twizmwazin committed Aug 30, 2023
1 parent 06db4e6 commit ee302c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions angr_platforms/avr/lift_avr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1645,18 +1645,18 @@ def main():
for num, test in enumerate(tests):
print(num)
lifter = LifterAVR(ArchAVR(), 0)
lifter._lift(data=test)
lifter.lift(data=test)

print("Lifter test:")
for test in tests:
lifter = LifterAVR(ArchAVR(), 0)
lifter._lift(data=test)
lifter.lift(data=test)
lifter.irsb.pp()

print("Full tests:")
fulltest = b"".join(tests)
lifter = LifterAVR(ArchAVR(), 0)
lifter._lift(data=fulltest)
lifter.lift(data=fulltest)
lifter.irsb.pp()


Expand Down
4 changes: 2 additions & 2 deletions angr_platforms/bf/lift_bf.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ class LifterBF(GymratLifter):
test1 = b'<>+-[].,'
test2 = b'<>+-[].,'
lifter = LifterBF(arch=archinfo.arch_from_id('bf'), addr=0)
lifter._lift(data=test1)
lifter.lift(data=test1)
lifter.irsb.pp()

lifter = LifterBF(arch=ArchBF(), addr=0)
lifter._lift(data=test2)
lifter.lift(data=test2)
lifter.irsb.pp()
4 changes: 2 additions & 2 deletions tests/test_tricore.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_lifting_abs_instructions(self):
print("Lifting (ABS format) ldmst 1000, e2", "-"*50)
inst = b'e5020005'
lifter = LifterTRICORE(ArchTRICORE(), 0)
lifter._lift(data=inst)
lifter.lift(data=inst)
lifter.irsb.pp()
self.assertEqual(lifter.irsb.arch.name, 'TRICORE')
self.assertEqual(lifter.irsb.stmts_used, 14)
Expand All @@ -27,7 +27,7 @@ def test_lifting_absb_instructions(self):
print("\nLifting (ABSB format) st.t 0x1000, 1, 0", "-"*50)
inst = b'D5010001'
lifter = LifterTRICORE(ArchTRICORE(), 0)
lifter._lift(data=inst)
lifter.lift(data=inst)
lifter.irsb.pp()
self.assertEqual(lifter.irsb.arch.name, 'TRICORE')
self.assertEqual(lifter.irsb.stmts_used, 21)
Expand Down

0 comments on commit ee302c2

Please sign in to comment.