Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msp430 doesn't show up in the Architecture list #15

Open
atlas0fd00m opened this issue Dec 19, 2022 · 1 comment
Open

msp430 doesn't show up in the Architecture list #15

atlas0fd00m opened this issue Dec 19, 2022 · 1 comment

Comments

@atlas0fd00m
Copy link

am i doing something wrong?

i opened a binary memory dump file, and attempted to choose the MSP430 architecture from the drop-down box when prompted. it's not there.

i'm on 3.0.3234-dev.

@sjossi
Copy link

sjossi commented Jul 13, 2023

If you have Python errors regarding the OR-ing of types, it's an issue with the plugin written against a Python 3.10 feature. @joshwatson do you think it makes sense to support older versions (I'm still on 3.9 myself) by switching to using Unions, or rather suggest people upgrade to a more reasonable Python version?

That was my fix:

diff --git a/lifter.py b/lifter.py
index 56b4aa0..0598abf 100644
--- a/lifter.py
+++ b/lifter.py
@@ -1,4 +1,4 @@
-from typing import Callable, List
+from typing import Callable, List, Union
 from binaryninja import (
     LLIL_TEMP,
     Architecture,
@@ -15,7 +15,7 @@ from .instructions import IMMEDIATE_MODE, INDIRECT_AUTOINCREMENT_MODE, REGISTER_

 SourceOperandsIL: List[
     Callable[
-        [LowLevelILFunction, int | None, RegisterType | None, int | None],
+        [LowLevelILFunction, Union[int, None], Union[RegisterType, None], Union[int, None]],
         ExpressionIndex,
     ]
 ] = [

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants