Vector packing
Detailed Description
Convenience functions for packing into vectors.
Functions | |
THREAD_SAFE void | append_db (bytevec_t &v, uchar x) |
Append a byte to a bytevec. | |
THREAD_SAFE void | append_obj (bytevec_t &v, const void *obj, size_t size) |
Append 'size' bytes from 'obj' to the bytevec;. | |
THREAD_SAFE void | append_dw (bytevec_t &v, uint16 x) |
Pack a word and append the result to the bytevec. | |
THREAD_SAFE void | append_dd (bytevec_t &v, uint32 x) |
Pack a double word and append the result to the bytevec. | |
THREAD_SAFE void | append_dq (bytevec_t &v, uint64 x) |
Pack a quadword and append the result to the bytevec. | |
THREAD_SAFE void | append_ea (bytevec_t &v, ea_t x) |
Pack an ea value and append the result to the bytevec. | |
THREAD_SAFE void | append_ds (bytevec_t &v, const char *x) |
Pack a string and append the result to the bytevec. | |
THREAD_SAFE void | append_buf (bytevec_t &v, const void *buf, size_t len) |
Pack an object of size 'len' and append the result to the bytevec. | |
THREAD_SAFE void | append_eavec (bytevec_t &v, ea_t ea, const eavec_t &insns) |
Pack an eavec and append the result to the bytevec. More... | |
Function Documentation
|
inline |
Pack an eavec and append the result to the bytevec.
Also see unpack_eavec().
- Parameters
-
v output vector ea when we pack an eavec, we only store the differences between each value and this parameter.
This is because groups of ea values will likely be similar, and therefore the differences will usually be small.
A good example is packing the addresses of a function prologue.
One can pass the start ea of the function as this parameter, which results in a quick and efficient packing/unpacking.
(Just be sure to use the func's start ea when unpacking, of course)insns eavec to pack
Generated by 1.8.9.1