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

Redesign the architecture recognition module in the python bindings #13

Open
patacca opened this issue Jun 20, 2023 · 1 comment
Open
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@patacca
Copy link
Collaborator

patacca commented Jun 20, 2023

As it is right now the whole architecture handling code that mostly resides in the analysis folder is rarely (if not never) being used in other parts of the python bindings and it is not easily extendible with other architectures.
There are some of the issues with its current implementation:

  • The base QuokkaArch class contains some fields that are either not common in all architectures (there is no inst_pointer register in ppc) or not easily defined (like compared_mnemonics)
  • We aim to use QuokkaArch as an interface to a generic architecture but at the same time we are building the various architecture specific subclasses directly from capstone, so it doesn't hold much additional information.
  • Imho it makes more sense to get the calling convention from the binary itself instead of defining them per system/architecture
  • The Enviornment and Replacer classes are never being used

As things are right now it's not really working as intended, either we drop it and just rely on capstone architecture or we fix it to have a proper interface to a generic architecture

@patacca patacca added help wanted Extra attention is needed question Further information is requested labels Jun 20, 2023
@patacca
Copy link
Collaborator Author

patacca commented Jun 21, 2023

An example of a relevant PR that added support for MIPS and PPC #12
The new architectures are not completely fitting in the current architecture handling mechanism

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant