- void setupForSymbolicDisassembly(LLVMOpInfoCallback getOpInfo,
- LLVMSymbolLookupCallback symbolLookUp,
- void *disInfo,
- MCContext *ctx) {
- GetOpInfo = getOpInfo;
- SymbolLookUp = symbolLookUp;
- DisInfo = disInfo;
- Ctx = ctx;
- }
+ // Helpers around MCSymbolizer
+ bool tryAddingSymbolicOperand(MCInst &Inst,
+ int64_t Value,
+ uint64_t Address, bool IsBranch,
+ uint64_t Offset, uint64_t InstSize) const;
+
+ void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const;
+
+ /// Set \p Symzer as the current symbolizer.
+ /// This takes ownership of \p Symzer, and deletes the previously set one.
+ void setSymbolizer(OwningPtr<MCSymbolizer> &Symzer);
+
+ /// Sets up an external symbolizer that uses the C API callbacks.
+ void setupForSymbolicDisassembly(LLVMOpInfoCallback GetOpInfo,
+ LLVMSymbolLookupCallback SymbolLookUp,
+ void *DisInfo,
+ MCContext *Ctx,
+ OwningPtr<MCRelocationInfo> &RelInfo);
+