Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_debug.h>
#include <DbgEng.h>
#include "native/reg/windows-x64.h"
#include "native/reg/windows-x86.h"
#include "native/reg/windows-arm.h"
#include "native/reg/windows-arm64.h"
Go to the source code of this file.
Classes | |
struct | DbgEngContext |
Macros | |
#define | CONTEXT_ARM 0x00200000L |
#define | CONTEXT_ARM64 0x00400000L |
#define | CONTEXT_AMD64 0x00100000L |
#define | CONTEXT_i386 0x00010000L |
#define | IMAGE_FILE_MACHINE_ARM64 0xAA64 |
#define | DEBUG_DUMP_ACTIVE 1030 |
#define | TIMEOUT 500 |
#define | THISCALL(dbginterface, function, ...) dbginterface->lpVtbl->function(dbginterface, __VA_ARGS__) |
#define | ITHISCALL(dbginterface, function, ...) THISCALL(idbg->dbginterface, function, __VA_ARGS__) |
#define | RELEASE(I) |
Variables | |
static bool | do_break = false |
RzDebugPlugin | rz_debug_plugin_windbg |
RZ_API RzLibStruct | rizin_plugin |
#define CONTEXT_AMD64 0x00100000L |
Definition at line 14 of file debug_windbg.c.
#define CONTEXT_ARM 0x00200000L |
Definition at line 8 of file debug_windbg.c.
#define CONTEXT_ARM64 0x00400000L |
Definition at line 11 of file debug_windbg.c.
#define CONTEXT_i386 0x00010000L |
Definition at line 17 of file debug_windbg.c.
#define DEBUG_DUMP_ACTIVE 1030 |
Definition at line 23 of file debug_windbg.c.
#define IMAGE_FILE_MACHINE_ARM64 0xAA64 |
Definition at line 20 of file debug_windbg.c.
#define ITHISCALL | ( | dbginterface, | |
function, | |||
... | |||
) | THISCALL(idbg->dbginterface, function, __VA_ARGS__) |
Definition at line 28 of file debug_windbg.c.
#define RELEASE | ( | I | ) |
#define THISCALL | ( | dbginterface, | |
function, | |||
... | |||
) | dbginterface->lpVtbl->function(dbginterface, __VA_ARGS__) |
Definition at line 27 of file debug_windbg.c.
#define TIMEOUT 500 |
Definition at line 26 of file debug_windbg.c.
|
static |
Definition at line 139 of file debug_windbg.c.
References dbg, do_break, is_target_kernel(), rz_debug_t::plugin_data, and windbg_stop().
Referenced by windbg_wait().
|
static |
Definition at line 105 of file debug_windbg.c.
References EXCEPTION_ACCESS_VIOLATION, EXCEPTION_BREAKPOINT, EXCEPTION_FLT_DENORMAL_OPERAND, EXCEPTION_FLT_DIVIDE_BY_ZERO, EXCEPTION_FLT_INEXACT_RESULT, EXCEPTION_FLT_INVALID_OPERATION, EXCEPTION_FLT_OVERFLOW, EXCEPTION_FLT_STACK_CHECK, EXCEPTION_FLT_UNDERFLOW, EXCEPTION_GUARD_PAGE, EXCEPTION_ILLEGAL_INSTRUCTION, EXCEPTION_INT_DIVIDE_BY_ZERO, EXCEPTION_SINGLE_STEP, RZ_DEBUG_REASON_BREAKPOINT, RZ_DEBUG_REASON_DIVBYZERO, RZ_DEBUG_REASON_FPU, RZ_DEBUG_REASON_ILLEGAL, RZ_DEBUG_REASON_SEGFAULT, RZ_DEBUG_REASON_STEP, and RZ_DEBUG_REASON_TRAP.
Referenced by windbg_wait().
Definition at line 57 of file debug_windbg.c.
References rz_io_t::desc, rz_io_plugin_t::name, and rz_io_desc_t::plugin.
Referenced by windbg_init().
|
static |
Definition at line 47 of file debug_windbg.c.
References ITHISCALL, and ULONG.
Referenced by break_debugger(), read_at_uva_or_kernel(), windbg_select(), windbg_wait(), and winkd_list_modules().
Definition at line 484 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, pid, rz_debug_t::plugin_data, rz_return_val_if_fail, DbgEngContext::server, ULONG, and windbg_wait().
|
static |
Definition at line 222 of file debug_windbg.c.
References b, dbg, flags, DbgEngContext::initialized, InterlockedIncrement, ITHISCALL, LONG, rz_debug_t::plugin_data, PULONG, RZ_PERM_R, RZ_PERM_RW, RZ_PERM_W, RZ_PERM_X, rz_return_val_if_fail, THISCALL, type, ULONG, and rz_bp_t::user.
Definition at line 96 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, DbgEngContext::lastExecutionStatus, rz_debug_t::plugin_data, and rz_return_val_if_fail.
Definition at line 499 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, rz_debug_t::plugin_data, and rz_return_val_if_fail.
Definition at line 323 of file debug_windbg.c.
References dbg, f, free(), i, DbgEngContext::initialized, ITHISCALL, NULL, rz_debug_t::plugin_data, rz_list_append(), rz_list_newf(), RZ_NEW0, RZ_NEWS, rz_return_val_if_fail, and ULONG.
Definition at line 578 of file debug_windbg.c.
References dbg, free(), DbgEngContext::initialized, ITHISCALL, p, path, rz_debug_t::pid, rz_debug_t::plugin_data, rz_return_val_if_fail, rz_str_appendf(), RZ_STR_ISEMPTY, rz_sys_getdir(), rz_sys_getenv(), and RZ_SYS_TMP.
|
static |
Definition at line 560 of file debug_windbg.c.
References dbg, info(), DbgEngContext::initialized, ITHISCALL, NULL, rz_debug_t::pid, rz_debug_t::plugin_data, RZ_NEW0, rz_return_val_if_fail, DbgEngContext::server, strdup(), and rz_debug_t::tid.
Definition at line 61 of file debug_windbg.c.
References rz_io_desc_t::data, dbg, rz_io_t::desc, DbgEngContext::initialized, rz_io_bind_t::io, io_desc_is_windbg(), rz_debug_t::iob, and rz_debug_t::plugin_data.
Definition at line 505 of file debug_windbg.c.
References dbg, DEBUG_DUMP_ACTIVE, DbgEngContext::initialized, ITHISCALL, rz_debug_t::plugin_data, and ULONG.
Definition at line 403 of file debug_windbg.c.
References dbg, free(), h, i, DbgEngContext::initialized, ITHISCALL, malloc(), map(), memset(), mod(), NULL, rz_debug_t::plugin_data, PVOID, rz_debug_map_free(), rz_debug_map_new(), rz_list_append(), rz_list_free(), rz_list_length(), rz_list_newf(), RZ_NEWS, RZ_NEWS0, RZ_PERM_R, RZ_PERM_RW, RZ_PERM_RWX, RZ_PERM_RX, RZ_PERM_X, rz_return_val_if_fail, s, sdb_fmt(), to, ULONG, ut64(), and windbg_modules_get().
Definition at line 352 of file debug_windbg.c.
References dbg, free(), i, DbgEngContext::initialized, ITHISCALL, malloc(), mod(), NULL, rz_debug_t::plugin_data, rz_debug_map_free(), rz_debug_map_new(), rz_list_append(), rz_list_newf(), RZ_NEWS, rz_return_val_if_fail, strdup(), and ULONG.
Referenced by windbg_map_get().
Definition at line 597 of file debug_windbg.c.
References dbg, i, DbgEngContext::initialized, ITHISCALL, list(), NULL, path, pid, rz_debug_t::plugin_data, rz_debug_pid_free(), rz_debug_pid_new(), rz_list_append(), rz_list_newf(), rz_return_val_if_fail, DbgEngContext::server, and ULONG.
|
static |
Definition at line 266 of file debug_windbg.c.
References rz_debug_t::bits, dbg, IMAGE_FILE_MACHINE_ARM64, DbgEngContext::initialized, ITHISCALL, NULL, rz_debug_t::plugin_data, RZ_SYS_BITS_64, type, and ULONG.
Definition at line 289 of file debug_windbg.c.
References b, CONTEXT_AMD64, CONTEXT_ARM, CONTEXT_ARM64, CONTEXT_i386, dbg, DWORD, IMAGE_FILE_MACHINE_ARM64, DbgEngContext::initialized, ITHISCALL, rz_debug_t::plugin_data, PVOID, rz_return_val_if_fail, and ULONG.
Definition at line 314 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, rz_debug_t::plugin_data, PVOID, and rz_return_val_if_fail.
Definition at line 79 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, is_target_kernel(), ITHISCALL, pid, rz_debug_t::plugin_data, rz_return_val_if_fail, and ULONG.
Referenced by windbg_threads(), and windbg_wait().
Definition at line 72 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, DbgEngContext::lastExecutionStatus, rz_debug_t::plugin_data, and rz_return_val_if_fail.
Definition at line 212 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, DbgEngContext::lastExecutionStatus, rz_debug_t::pid, rz_debug_t::plugin_data, RZ_DEBUG_REASON_ERROR, rz_return_val_if_fail, and windbg_wait().
Definition at line 131 of file debug_windbg.c.
References dbg, DbgEngContext::initialized, ITHISCALL, rz_debug_t::plugin_data, and rz_return_val_if_fail.
Referenced by break_debugger().
Definition at line 529 of file debug_windbg.c.
References dbg, free(), i, DbgEngContext::initialized, ITHISCALL, list(), NULL, pc, rz_debug_t::pid, rz_debug_t::plugin_data, PULONG, rz_debug_pid_free(), rz_debug_pid_new(), rz_list_append(), rz_list_newf(), RZ_NEWS, rz_return_val_if_fail, rz_debug_t::tid, ULONG, and windbg_select().
Definition at line 148 of file debug_windbg.c.
References rz_debug_reason_t::addr, break_debugger(), dbg, do_break, exception_to_reason(), DbgEngContext::initialized, is_target_kernel(), ITHISCALL, DbgEngContext::lastExecutionStatus, NULL, rz_debug_t::pid, rz_debug_t::plugin_data, PULONG, rz_debug_t::reason, rz_cons_break_pop(), rz_cons_break_push(), RZ_DEBUG_REASON_BREAKPOINT, RZ_DEBUG_REASON_DEAD, RZ_DEBUG_REASON_ERROR, RZ_DEBUG_REASON_EXIT_PID, RZ_DEBUG_REASON_NEW_PID, RZ_DEBUG_REASON_STEP, RZ_DEBUG_REASON_USERSUSP, rz_return_val_if_fail, rz_time_now(), rz_debug_reason_t::tid, rz_debug_t::tid, TIMEOUT, timeout, rz_debug_reason_t::timestamp, rz_debug_reason_t::type, ULONG, and windbg_select().
Referenced by windbg_attach(), and windbg_step_over().
Definition at line 137 of file debug_windbg.c.
Referenced by break_debugger(), and windbg_wait().
RZ_API RzLibStruct rizin_plugin |
Definition at line 649 of file debug_windbg.c.
RzDebugPlugin rz_debug_plugin_windbg |
Definition at line 619 of file debug_windbg.c.