From 1c983286a91bc224ac792174b6e2fb7e124613c7 Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 15 May 2023 22:33:42 +0300 Subject: Impl relocation marks support --- disasm.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'disasm.h') diff --git a/disasm.h b/disasm.h index 6f90dad..4f0ef9f 100644 --- a/disasm.h +++ b/disasm.h @@ -294,7 +294,12 @@ struct Arg { a.uword = instr; return a; } - int SNPrint(char *buf, size_t bufsz, const Settings&) const; + int SNPrint( + char *buf, + size_t bufsz, + bool has_relocation = false, + uint32_t self_addr = 0, + uint32_t reloc_addr = 0) const; }; enum class TracedNodeType { @@ -343,7 +348,11 @@ struct Op { { return Op::Typical(OpCode::kRaw, OpSize::kNone, Arg::Raw(instr)); } - int FPrint(FILE*, const Settings&) const; + int FPrint( + FILE *, + bool has_relocation = false, + uint32_t self_addr = 0, + uint32_t reloc_addr = 0) const; }; struct DisasmNode { @@ -367,6 +376,7 @@ struct DisasmNode { * returns size of whole instruction with arguments in bytes */ size_t Disasm(const DataBuffer &code); + size_t DisasmAsRaw(const DataBuffer &code); void AddReferencedBy(uint32_t offset, ReferenceType); ~DisasmNode(); }; -- cgit v1.2.3