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

Assembly manipulation and generation #14

Open
etherealvisage opened this issue May 18, 2018 · 0 comments
Open

Assembly manipulation and generation #14

etherealvisage opened this issue May 18, 2018 · 0 comments

Comments

@etherealvisage
Copy link
Contributor

One feature I'd really love to see in Egalito is assembly manipulation, for handling cases when you want to e.g. modify which registers an instruction is referencing or change the opcode from add to or. Another feature that would be really nice is an API for generating assembly from an opcode + registers/memory addresses specification (similar to what XED provides, but integrated with the link/chunk/rewriting support etc in Egalito. Something like this would be lovely:

std::vector<Instruction *> instructions = {
    createInstruction("mov", RegisterOpcodeSpecification(X86PlatformRegister::RAX),
        DereferenceOpcodeSpecification(X86PlatformRegister::RDI)),
    createInstruction("lea", RegisterOpcodeSpecification(X86PlatformRegister::RBX),
        IPRelativeLinkReference(somelink))
};

One problem of course is making this somehow cross-platform... Integrating support for Keystone might be one option?

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

1 participant