Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
#include <rz_core.h>
#include <rz_heap_glibc.h>
#include "cmd_descs.h"
#include "../linux_heap_glibc.h"
#include "../linux_heap_glibc64.h"
Go to the source code of this file.
Macros | |
#define | call_handler(fun, ...) |
Functions | |
RZ_IPI RzCmdStatus | rz_cmd_heap_chunks_print_handler (RzCore *core, int argc, const char **argv, RzCmdStateOutput *state) |
RZ_IPI RzCmdStatus | rz_cmd_arena_print_handler (RzCore *core, int argc, const char **argv) |
RZ_IPI RzCmdStatus | rz_cmd_main_arena_print_handler (RzCore *core, int argc, const char **argv, RzOutputMode mode) |
RZ_IPI RzCmdStatus | rz_cmd_heap_chunk_print_handler (RzCore *core, int argc, const char **argv) |
RZ_IPI RzCmdStatus | rz_cmd_heap_chunks_graph_handler (RzCore *core, int argc, const char **argv) |
RZ_IPI RzCmdStatus | rz_cmd_heap_info_print_handler (RzCore *core, int argc, const char **argv) |
RZ_IPI RzCmdStatus | rz_cmd_heap_tcache_print_handler (RzCore *core, int argc, const char **argv) |
RZ_IPI int | rz_cmd_heap_bins_list_print (void *data, const char *input) |
RZ_IPI int | rz_cmd_heap_fastbins_print (void *data, const char *input) |
RZ_IPI RzCmdStatus | rz_cmd_heap_arena_bins_print_handler (RzCore *core, int argc, const char **argv, RzOutputMode mode) |
RZ_API RzList * | rz_heap_arenas_list (RzCore *core) |
Returns RzList* for a list of arenas. Each arena is represented by RzArenaListItem struct. More... | |
RZ_API RzList * | rz_heap_chunks_list (RzCore *core, ut64 m_arena) |
Returns RzList* for a list of chunks from the arena. Each chunk is represented by RzHeapChunkListItem struct. More... | |
RZ_API RzHeapChunkSimple * | rz_heap_chunk (RzCore *core, ut64 addr) |
Returns detailed information about a heap chunk. The chunk is represented by RzHeapChunkSimple struct. More... | |
RZ_API RzHeapBin * | rz_heap_bin_content (RzCore *core, MallocState *arena, int bin_num, ut64 m_arena) |
Returns information about a heap bin. The information is represented as RzHeapBin struct The bins covered by this are unsorted, small and large bins Bin num is zero indexed i.e unsorted bin starts from number 0. More... | |
RZ_API RzHeapBin * | rz_heap_fastbin_content (RzCore *core, MallocState *arena, int bin_num) |
Returns information about a fastbin. The information is represented as RzHeapBin struct. More... | |
RZ_API MallocState * | rz_heap_get_arena (RzCore *core, ut64 m_state) |
Returns MallocState struct for given base address of the arena. This function checks if the arena is valid and then returns the MallocState. If the base address provided is zero it returns the malloc state for the main arena. More... | |
RZ_API RzList * | rz_heap_tcache_content (RzCore *core, ut64 arena_base) |
Get a list of bins for the tcache associated with an arena The list is in form of RzList and the bins are of the form of RzHeapBin Arena has the base address arena_base. More... | |
RZ_API bool | rz_heap_write_chunk (RzCore *core, RzHeapChunkSimple *chunk_simple) |
Write a heap chunk header to memory. More... | |
#define call_handler | ( | fun, | |
... | |||
) |
Definition at line 11 of file cmd_linux_heap_glibc.c.
RZ_IPI RzCmdStatus rz_cmd_arena_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv | ||
) |
Definition at line 24 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_arena_print_handler().
RZ_IPI RzCmdStatus rz_cmd_heap_arena_bins_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv, | ||
RzOutputMode | mode | ||
) |
Definition at line 71 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_heap_arena_bins_print_handler().
Definition at line 61 of file cmd_linux_heap_glibc.c.
References call_handler, input(), and rz_cmd_heap_bins_list_print().
Referenced by rz_cmd_heap_bins_list_print(), and rzshell_cmddescs_init().
RZ_IPI RzCmdStatus rz_cmd_heap_chunk_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv | ||
) |
Definition at line 32 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_heap_chunk_print_handler().
RZ_IPI RzCmdStatus rz_cmd_heap_chunks_graph_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv | ||
) |
Definition at line 36 of file cmd_linux_heap_glibc.c.
References argv, rz_asm_t::bits, rz_core_t::rasm, rz_cmd_state_output_fini(), rz_cmd_state_output_init(), rz_cmd_state_output_print(), RZ_CMD_STATUS_ERROR, and RZ_OUTPUT_MODE_LONG.
Referenced by rzshell_cmddescs_init().
RZ_IPI RzCmdStatus rz_cmd_heap_chunks_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 20 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_heap_chunks_print_handler().
Definition at line 66 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_heap_fastbins_print().
RZ_IPI RzCmdStatus rz_cmd_heap_info_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv | ||
) |
Definition at line 53 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_heap_info_print_handler().
RZ_IPI RzCmdStatus rz_cmd_heap_tcache_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv | ||
) |
Definition at line 57 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_heap_tcache_print_handler().
RZ_IPI RzCmdStatus rz_cmd_main_arena_print_handler | ( | RzCore * | core, |
int | argc, | ||
const char ** | argv, | ||
RzOutputMode | mode | ||
) |
Definition at line 28 of file cmd_linux_heap_glibc.c.
Referenced by rz_cmd_main_arena_print_handler().
Returns RzList* for a list of arenas. Each arena is represented by RzArenaListItem struct.
core | RzCore pointer |
Definition at line 82 of file cmd_linux_heap_glibc.c.
References call_handler, and rz_heap_arena_list_wrapper().
RZ_API RzHeapBin* rz_heap_bin_content | ( | RzCore * | core, |
MallocState * | arena, | ||
int | bin_num, | ||
ut64 | m_arena | ||
) |
Returns information about a heap bin. The information is represented as RzHeapBin struct The bins covered by this are unsorted, small and large bins Bin num is zero indexed i.e unsorted bin starts from number 0.
core | RzCore pointer |
arena | Malloc state struct for the arena |
bin_num | Bin number from NBINS array |
Definition at line 114 of file cmd_linux_heap_glibc.c.
References call_handler.
RZ_API RzHeapChunkSimple* rz_heap_chunk | ( | RzCore * | core, |
ut64 | addr | ||
) |
Returns detailed information about a heap chunk. The chunk is represented by RzHeapChunkSimple struct.
core | RzCore pointer |
addr | Base address of the heap chunk |
Definition at line 102 of file cmd_linux_heap_glibc.c.
References addr, call_handler, and rz_heap_chunk_wrapper().
Returns RzList* for a list of chunks from the arena. Each chunk is represented by RzHeapChunkListItem struct.
core | RzCore pointer |
m_arena | Base Address of the arena |
Definition at line 92 of file cmd_linux_heap_glibc.c.
References call_handler, and rz_heap_chunks_list_wrapper().
RZ_API RzHeapBin* rz_heap_fastbin_content | ( | RzCore * | core, |
MallocState * | arena, | ||
int | bin_num | ||
) |
Returns information about a fastbin. The information is represented as RzHeapBin struct.
core | RzCore pointer |
arena | Malloc state struct for the arena |
bin_num | Bin number from Fastbins array |
Definition at line 125 of file cmd_linux_heap_glibc.c.
References call_handler.
RZ_API MallocState* rz_heap_get_arena | ( | RzCore * | core, |
ut64 | m_state | ||
) |
Returns MallocState struct for given base address of the arena. This function checks if the arena is valid and then returns the MallocState. If the base address provided is zero it returns the malloc state for the main arena.
core | RzCore pointer |
m_state | Base address of the arena |
Definition at line 137 of file cmd_linux_heap_glibc.c.
References call_handler.
Get a list of bins for the tcache associated with an arena The list is in form of RzList and the bins are of the form of RzHeapBin Arena has the base address arena_base.
core | RzCore pointer |
arena_base | Base address of the arena |
Definition at line 149 of file cmd_linux_heap_glibc.c.
References call_handler.
RZ_API bool rz_heap_write_chunk | ( | RzCore * | core, |
RzHeapChunkSimple * | chunk_simple | ||
) |
Write a heap chunk header to memory.
core | RzCore pointer |
chunk_simple | RzHeapChunkSimple pointer to the heap chunk data |
Definition at line 159 of file cmd_linux_heap_glibc.c.
References call_handler, and rz_heap_write_heap_chunk().