DynamoRIO
|
#include <decode_cache.h>

Public Member Functions | |
void | set_decode_info (void *dcontext, const dynamorio::drmemtrace::_memref_instr_t &memref_instr, instr_t *instr, app_pc decode_pc) |
bool | is_valid () const |
std::string | get_error_string () const |
Detailed Description
Base class for storing instruction decode info. Users should sub-class this base class and implement set_decode_info_derived() to derive and store the decode info they need.
Member Function Documentation
◆ get_error_string()
std::string dynamorio::drmemtrace::decode_info_base_t::get_error_string | ( | ) | const |
Returns the details of the error encountered when decoding the instruction or during the custom logic in set_decode_info_derived().
◆ is_valid()
bool dynamorio::drmemtrace::decode_info_base_t::is_valid | ( | ) | const |
Indicates whether set_decode_info() was successfully invoked on the object by a dynamorio::drmemtrace::decode_cache_t using a successfully decoded instruction. is_valid() will be false if the object is default-constructed.
◆ set_decode_info()
void dynamorio::drmemtrace::decode_info_base_t::set_decode_info | ( | void * | dcontext, |
const dynamorio::drmemtrace::_memref_instr_t & | memref_instr, | ||
instr_t * | instr, | ||
app_pc | decode_pc | ||
) |
Sets the decode info for the provided instr
which was allocated using the provided dcontext
for the provided memref_instr
, decoded from raw bytes at the provided address in decode_pc
(raw bytes address is valid only for this call).
This invokes the set_decode_info_derived() provided by the derived class, and additionally does other required bookkeeping.
set_decode_info_derived() is expected to take ownership of the provided instr
if used with a dynamorio::drmemtrace::decode_cache_t object constructed with persist_decoded_instr_
set to true.
The provided instr
will be nullptr if the dynamorio::drmemtrace::decode_cache_t was constructed with include_decoded_instr_
set to false, which is useful when the user needs only the decode_pc
to perform the actual decoding themselves.
The documentation for this class was generated from the following file:
- /home/runner/work/dynamorio/dynamorio/build_release-64/clients/include/drmemtrace/decode_cache.h