| 698 | } |
| 699 | |
| 700 | bool Architecture::AssembleCallback(void* ctxt, const char* code, uint64_t addr, BNDataBuffer* result, char** errors) |
| 701 | { |
| 702 | CallbackRef<Architecture> arch(ctxt); |
| 703 | DataBuffer buf; |
| 704 | string errorStr; |
| 705 | bool ok = arch->Assemble(code, addr, buf, errorStr); |
| 706 | |
| 707 | BNSetDataBufferContents(result, buf.GetData(), buf.GetLength()); |
| 708 | *errors = BNAllocString(errorStr.c_str()); |
| 709 | return ok; |
| 710 | } |
| 711 | |
| 712 | |
| 713 | bool Architecture::IsNeverBranchPatchAvailableCallback(void* ctxt, const uint8_t* data, uint64_t addr, size_t len) |