class Disassembler
Defined at line 32 of file ../../src/developer/debug/zxdb/client/disassembler.h
Disassembles a block of data.
Public Methods
void Disassembler ()
Defined at line 130 of file ../../src/developer/debug/zxdb/client/disassembler.cc
void ~Disassembler ()
Defined at line 131 of file ../../src/developer/debug/zxdb/client/disassembler.cc
Err Init (const ArchInfo * arch)
The ArchInfo pointer must outlive this class. Since typically this will come from the Session
object which can destroy the LLVM context when the agent is disconnected, you will not want to
store Disassembler objects.
Defined at line 133 of file ../../src/developer/debug/zxdb/client/disassembler.cc
size_t DisassembleOne (const uint8_t * data, size_t data_len, uint64_t address, const Options & options, Row * out)
Disassembles one machine instruction, setting the required information the to columns of the
output vector. The output buffer will have columns for instruction, parameters, and comments.
If addresses and bytes are requested, those will be prepended.
The number of bytes consumed will be returned.
Be sure the input buffer always has enough data for any instruction.
Defined at line 153 of file ../../src/developer/debug/zxdb/client/disassembler.cc
size_t DisassembleMany (const uint8_t * data, size_t data_len, uint64_t start_address, const Options & options, size_t max_instructions, std::vector<Row> * out)
Disassembles the block, either until there is no more data, or |max_instructions| have been
decoded. If max_instructions is 0 it will always decode the whole block.
*Appends* the instructions to the output vector. The max_instructions applies to the total size
of the output (so counts what may have already been there).
The output will be one vector of columns per line. See DisassembleOne for row format.
Defined at line 201 of file ../../src/developer/debug/zxdb/client/disassembler.cc
size_t DisassembleDump (const MemoryDump & dump, uint64_t start_address, const Options & options, size_t max_instructions, std::vector<Row> * out)
Like DisassembleMany() but uses a MemoryDump object. The dump will start at the beginning of
the memory dump. This function understands the addresses of the memory dump, and also invalid
ranges (which will be marked in the disassembly).
An unmapped range will be counted as one instruction. The memory addresses for unmapped ranges
will always be shown even if disabled in the options.
Defined at line 223 of file ../../src/developer/debug/zxdb/client/disassembler.cc
Enumerations
enum InstructionType
| Name | Value |
|---|---|
| kCallDirect | 0 |
| kCallIndirect | 1 |
| kOther | 2 |
Special known instruction classes. These are just the types of instructions we have a need to
identify, more classes can be added as needed.
Defined at line 45 of file ../../src/developer/debug/zxdb/client/disassembler.h