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

Refactor arches to be singletons #181

Open
twizmwazin opened this issue Sep 12, 2023 · 0 comments
Open

Refactor arches to be singletons #181

twizmwazin opened this issue Sep 12, 2023 · 0 comments

Comments

@twizmwazin
Copy link
Member

Description

Arches now are kind of like singletons. They probably should be. I'm told there are some cursed copies and mutations floating around in angr's x86 real mode stuff that expects the current behavior, but this behavior should be eliminated if possible.

Since arches come in variants, most commonly BE/LE, we might want to have a get_all_variants function per-arch that does the instantiation. Alternatively, we could just make the classes the singleton themselves, so an arch that varies only in endness like mips32 might have 3 classes: BaseMips32, Mips32LE, and MIPS32BE. Or the base and one of the endnesses could be merged.

Alternatives

No response

Additional context

No response

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

No branches or pull requests

1 participant