Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | DbgEngContext |
Macros | |
#define | INITGUID |
#define | WINDBGURI "windbg://" |
#define | THISCALL(dbginterface, function, ...) dbginterface->lpVtbl->function(dbginterface, __VA_ARGS__) |
#define | ITHISCALL(dbginterface, function, ...) THISCALL(idbg->dbginterface, function, __VA_ARGS__) |
#define | DECLARE_CALLBACKS_IMPL(Type, IFace) |
#define | INIT_IUNKNOWN_CALLBACKS(IFace, lpVtbl) |
#define | DECLARE_NEW(IFace, IVtbl) |
#define | DECLARE_QUERYINTERFACE(IFace, IFaceIID) |
#define | DECLARE_ADDREF(IFace) |
#define | DECLARE_RELEASE(IFace) |
#define | RELEASE(I) |
#define | RELEASE(I) |
Typedefs | |
typedef HRESULT(__stdcall * | DebugCreate_t) (_In_ REFIID InterfaceId, _Out_ PVOID *Interface) |
typedef HRESULT(__stdcall * | DebugConnectWide_t) (_In_ PCWSTR RemoteOptions, _In_ REFIID InterfaceId, _Out_ PVOID *Interface) |
Enumerations | |
enum | DbgEngTarget { TARGET_LOCAL_SPAWN , TARGET_LOCAL_ATTACH , TARGET_LOCAL_KERNEL , TARGET_DUMP_FILE , TARGET_KERNEL } |
Functions | |
static STDMETHODIMP | __interest_mask (PDEBUG_EVENT_CALLBACKS This, PULONG Mask) |
static STDMETHODIMP | __createprocess_cb (PDEBUG_EVENT_CALLBACKS This, ULONG64 ImageFileHandle, ULONG64 Handle, ULONG64 BaseOffset, ULONG ModuleSize, PCSTR ModuleName, PCSTR ImageName, ULONG CheckSum, ULONG TimeDateStamp, ULONG64 InitialThreadHandle, ULONG64 ThreadDataOffset, ULONG64 StartOffset) |
static STDMETHODIMP | __breakpoint_cb (PDEBUG_EVENT_CALLBACKS This, PDEBUG_BREAKPOINT Bp) |
static STDMETHODIMP | __exception_cb (PDEBUG_EVENT_CALLBACKS This, PEXCEPTION_RECORD64 Exception, ULONG FirstChance) |
static STDMETHODIMP | __exit_process_cb (PDEBUG_EVENT_CALLBACKS This, ULONG ExitCode) |
static STDMETHODIMP | __system_error_cb (PDEBUG_EVENT_CALLBACKS This, ULONG Error, ULONG Level) |
static STDMETHODIMP | __input_cb (PDEBUG_INPUT_CALLBACKS This, ULONG BufferSize) |
static STDMETHODIMP | __input_end_cb (PDEBUG_INPUT_CALLBACKS This) |
static STDMETHODIMP | __output_cb (PDEBUG_OUTPUT_CALLBACKS This, ULONG Mask, PCSTR Text) |
static void | DEBUG_EVENT_CALLBACKS_vtbl_init (PDEBUG_EVENT_CALLBACKS callbacks) |
static void | DEBUG_INPUT_CALLBACKS_vtbl_init (PDEBUG_INPUT_CALLBACKS callbacks) |
static void | DEBUG_OUTPUT_CALLBACKS_vtbl_init (PDEBUG_OUTPUT_CALLBACKS callbacks) |
static void | __free_context (DbgEngContext *idbg) |
static bool | init_callbacks (DbgEngContext *idbg) |
static DbgEngContext * | create_remote_context (const char *opts) |
static DbgEngContext * | create_context (void) |
static int | windbg_init (void) |
static bool | windbg_check (RzIO *io, const char *uri, bool many) |
static bool | cur_dbg_plugin_is_windbg (RzDebug *dbg) |
static RzIODesc * | windbg_open (RzIO *io, const char *uri, int perm, int mode) |
static int | windbg_close (RzIODesc *fd) |
static ut64 | windbg_lseek (RzIO *io, RzIODesc *fd, ut64 offset, int whence) |
static int | windbg_read (RzIO *io, RzIODesc *fd, ut8 *buf, int count) |
static int | windbg_write (RzIO *io, RzIODesc *fd, const ut8 *buf, int count) |
static int | windbg_getpid (RzIODesc *fd) |
static int | windbg_gettid (RzIODesc *fd) |
static bool | windbg_getbase (RzIODesc *fd, ut64 *base) |
static char * | windbg_system (RzIO *io, RzIODesc *fd, const char *cmd) |
Variables | |
static DebugCreate_t | w32_DebugCreate = NULL |
static DebugConnectWide_t | w32_DebugConnectWide = NULL |
RzIOPlugin | rz_io_plugin_windbg |
RZ_API RzLibStruct | rizin_plugin |
#define DECLARE_ADDREF | ( | IFace | ) |
Definition at line 88 of file io_windbg.c.
#define DECLARE_CALLBACKS_IMPL | ( | Type, | |
IFace | |||
) |
#define DECLARE_NEW | ( | IFace, | |
IVtbl | |||
) |
Definition at line 51 of file io_windbg.c.
#define DECLARE_QUERYINTERFACE | ( | IFace, | |
IFaceIID | |||
) |
Definition at line 72 of file io_windbg.c.
#define DECLARE_RELEASE | ( | IFace | ) |
Definition at line 95 of file io_windbg.c.
#define INIT_IUNKNOWN_CALLBACKS | ( | IFace, | |
lpVtbl | |||
) |
Definition at line 46 of file io_windbg.c.
#define INITGUID |
Definition at line 4 of file io_windbg.c.
#define ITHISCALL | ( | dbginterface, | |
function, | |||
... | |||
) | THISCALL(idbg->dbginterface, function, __VA_ARGS__) |
Definition at line 37 of file io_windbg.c.
#define RELEASE | ( | I | ) |
#define THISCALL | ( | dbginterface, | |
function, | |||
... | |||
) | dbginterface->lpVtbl->function(dbginterface, __VA_ARGS__) |
Definition at line 36 of file io_windbg.c.
#define WINDBGURI "windbg://" |
Definition at line 20 of file io_windbg.c.
typedef HRESULT(__stdcall * DebugConnectWide_t) (_In_ PCWSTR RemoteOptions, _In_ REFIID InterfaceId, _Out_ PVOID *Interface) |
Definition at line 12 of file io_windbg.c.
Definition at line 8 of file io_windbg.c.
enum DbgEngTarget |
Enumerator | |
---|---|
TARGET_LOCAL_SPAWN | |
TARGET_LOCAL_ATTACH | |
TARGET_LOCAL_KERNEL | |
TARGET_DUMP_FILE | |
TARGET_KERNEL |
Definition at line 392 of file io_windbg.c.
|
static |
Definition at line 136 of file io_windbg.c.
Referenced by DEBUG_EVENT_CALLBACKS_vtbl_init().
|
static |
|
static |
Definition at line 140 of file io_windbg.c.
Referenced by DEBUG_EVENT_CALLBACKS_vtbl_init().
|
static |
Definition at line 144 of file io_windbg.c.
Referenced by DEBUG_EVENT_CALLBACKS_vtbl_init().
|
static |
Definition at line 210 of file io_windbg.c.
References free(), and RELEASE.
Referenced by create_context(), create_remote_context(), windbg_close(), and windbg_open().
|
static |
Definition at line 152 of file io_windbg.c.
References ITHISCALL, NULL, prompt(), rz_line_readline(), rz_line_set_prompt(), RZ_MIN, rz_str_ndup(), and cmd_descs_generate::str.
Referenced by DEBUG_INPUT_CALLBACKS_vtbl_init().
|
static |
Definition at line 164 of file io_windbg.c.
Referenced by DEBUG_INPUT_CALLBACKS_vtbl_init().
|
static |
|
static |
Definition at line 168 of file io_windbg.c.
References eprintf.
Referenced by DEBUG_OUTPUT_CALLBACKS_vtbl_init().
|
static |
Definition at line 148 of file io_windbg.c.
Referenced by DEBUG_EVENT_CALLBACKS_vtbl_init().
|
static |
Definition at line 305 of file io_windbg.c.
References __free_context(), DbgEngContext::dbgAdvanced, DbgEngContext::dbgClient, DbgEngContext::dbgCtrl, DbgEngContext::dbgData, DbgEngContext::dbgReg, DbgEngContext::dbgSymbols, DbgEngContext::dbgSysObj, fail, init_callbacks(), DbgEngContext::initialized, NULL, PVOID, RZ_NEW0, and w32_DebugCreate.
Referenced by windbg_open().
|
static |
Definition at line 264 of file io_windbg.c.
References __free_context(), DbgEngContext::dbgAdvanced, DbgEngContext::dbgClient, DbgEngContext::dbgCtrl, DbgEngContext::dbgData, DbgEngContext::dbgReg, DbgEngContext::dbgSymbols, DbgEngContext::dbgSysObj, fail, init_callbacks(), DbgEngContext::initialized, LPWSTR, NULL, PVOID, RZ_NEW0, and w32_DebugConnectWide.
Referenced by windbg_open().
Definition at line 388 of file io_windbg.c.
References rz_debug_t::cur, dbg, and rz_debug_plugin_t::name.
Referenced by windbg_close(), and windbg_open().
|
static |
Definition at line 185 of file io_windbg.c.
References __breakpoint_cb(), __createprocess_cb(), __exception_cb(), __exit_process_cb(), __interest_mask(), __system_error_cb(), and INIT_IUNKNOWN_CALLBACKS.
|
static |
Definition at line 195 of file io_windbg.c.
References __input_cb(), __input_end_cb(), and INIT_IUNKNOWN_CALLBACKS.
|
static |
Definition at line 201 of file io_windbg.c.
References __output_cb(), and INIT_IUNKNOWN_CALLBACKS.
|
static |
Definition at line 227 of file io_windbg.c.
References DbgEngContext::dbgClient, fail, ITHISCALL, NULL, and RELEASE.
Referenced by create_context(), and create_remote_context().
Definition at line 582 of file io_windbg.c.
References __free_context(), cur_dbg_plugin_is_windbg(), rz_core_t::dbg, fd, ITHISCALL, NULL, rz_debug_t::plugin_data, and DbgEngContext::server.
Definition at line 643 of file io_windbg.c.
Definition at line 656 of file io_windbg.c.
|
static |
Definition at line 344 of file io_windbg.c.
References free(), h, HANDLE, NULL, RZ_STR_ISNOTEMPTY, rz_sys_getenv(), rz_sys_perror, s, w32_DebugConnectWide, and w32_DebugCreate.
Referenced by windbg_open().
Definition at line 603 of file io_windbg.c.
References rz_io_t::off, RZ_IO_SEEK_CUR, RZ_IO_SEEK_END, RZ_IO_SEEK_SET, st64, and UT64_MAX.
Definition at line 400 of file io_windbg.c.
References __free_context(), rz_getopt_t::arg, rz_getopt_t::argc, args, argv, c, rz_core_bind_t::cfgGet, cmd, command, rz_core_bind_t::core, rz_io_t::corebind, create_context(), create_remote_context(), cur_dbg_plugin_is_windbg(), rz_core_t::dbg, DWORD, eprintf, fd, free(), rz_getopt_t::ind, ITHISCALL, z80_opcode::name, NULL, path, pid, rz_debug_t::plugin_data, realloc(), rz_getopt_init(), rz_getopt_next(), rz_io_desc_new(), rz_io_plugin_windbg, RZ_PERM_X, rz_str_argv(), rz_str_argv_free(), rz_str_format_msvc_argv(), rz_str_isnumber(), rz_str_newf(), rz_str_replace_ch(), rz_str_startswith(), rz_sys_getenv(), s, DbgEngContext::server, strdup(), TARGET_DUMP_FILE, TARGET_KERNEL, TARGET_LOCAL_ATTACH, TARGET_LOCAL_KERNEL, TARGET_LOCAL_SPAWN, autogen_x86imm::tmp, windbg_check(), windbg_init(), and WINDBGURI.
Definition at line 618 of file io_windbg.c.
References count, fd, ITHISCALL, off, rz_io_t::off, PVOID, and ULONG.
Definition at line 675 of file io_windbg.c.
References cmd, fd, ITHISCALL, NULL, and RZ_STR_ISEMPTY.
RZ_API RzLibStruct rizin_plugin |
Definition at line 704 of file io_windbg.c.
RzIOPlugin rz_io_plugin_windbg |
Definition at line 684 of file io_windbg.c.
Referenced by windbg_open().
|
static |
Definition at line 18 of file io_windbg.c.
Referenced by create_remote_context(), and windbg_init().
|
static |
Definition at line 17 of file io_windbg.c.
Referenced by create_context(), and windbg_init().