Skip to content
Snippets Groups Projects
Commit 1e618627 authored by jdh8d's avatar jdh8d
Browse files

Changed to fully use capstone! should be working, but still comparing against Bea for a while

parent bb76b202
No related branches found
No related tags found
No related merge requests found
......@@ -827,7 +827,7 @@ size_t NonceRelocs_t::DollopEntryClosingSize(DollopEntry_t* entry)
return 0;
}
void NonceRelocs_t::FixRelative(char *insn,
void NonceRelocs_t::FixRelative(Instruction_t* irdb_insn, char *insn,
size_t insn_size,
int displacement_distance,
RangeAddress_t voffset)
......@@ -865,7 +865,7 @@ void NonceRelocs_t::FixRelative(char *insn,
assert(is_rel_it!=operands.end());
const auto the_arg=*is_rel_it;
int offset=disasm.getMemoryDisplacementOffset(the_arg); //the_arg->Memory.DisplacementAddr-disasm.EIP;
int offset=disasm.getMemoryDisplacementOffset(the_arg, irdb_insn); //the_arg->Memory.DisplacementAddr-disasm.EIP;
assert(offset>=0 && offset <=15);
int size=the_arg.getMemoryDisplacementEncodingSize(); // the_arg->Memory.DisplacementSize;
assert(size==1 || size==2 || size==4 || size==8);
......@@ -979,7 +979,7 @@ RangeAddress_t NonceRelocs_t::PlopDollopEntry(Zipr_SDK::DollopEntry_t *de,
* pcrelative aspects. Use FixRelative in order to take
* care of that!
*/
FixRelative(instruction_bytes,
FixRelative(insn, instruction_bytes,
instruction_size,
cfi_space,
placed_addr);
......
......@@ -117,7 +117,7 @@ class NonceRelocs_t : public Zipr_SDK::ZiprPluginInterface_t
libIRDB::Relocation_t* FindRelocation(libIRDB::Instruction_t* insn, std::string type) const;
libIRDB::Relocation_t* FindNonceRelocation(libIRDB::Instruction_t* insn) const;
libIRDB::Relocation_t* FindSlowpathRelocation(libIRDB::Instruction_t* insn) const;
void FixRelative(char *, size_t, int, Zipr_SDK::RangeAddress_t);
void FixRelative(libIRDB::Instruction_t* irdb_insn, char *, size_t, int, Zipr_SDK::RangeAddress_t);
std::pair<libIRDB::Instruction_t*,libIRDB::Instruction_t*> MakeSlowPathCompares(string reg);
std::pair<libIRDB::Instruction_t*,libIRDB::Instruction_t*> MakeSlowPathComparesDyn(string reg);
std::pair<libIRDB::Instruction_t*,libIRDB::Instruction_t*> MakeSlowPathComparesExec(string reg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment