16 #define O_FLAG_XPVAD 1
17 #define O_(n) ctx->profile->f[n]
20 #define KOBJECT_PROCESS 3
21 #define KOBJECT_THREAD 6
48 if (!
ctx->read_at_kernel_virtual(
ctx->user, ptr, (
ut8 *)&res, 8)) {
55 return (res >> 8) & 0xff;
88 return ctx->cpu_count;
111 const bool is_cur_process =
ctx->target.eprocess && (
ctx->target.uniqueid ==
pid);
113 if (!is_cur_process) {
115 rz_list_foreach (l, it,
p) {
116 if (
p->uniqueid ==
pid) {
124 ctx->target.eprocess = 0;
125 ctx->target.uniqueid = 0;
129 const bool is_cur_thread =
ctx->target_thread.ethread && (
ctx->target_thread.uniqueid == tid);
131 if (!is_cur_thread || !is_cur_process) {
133 if (is_cur_process) {
134 rz_list_foreach (l, it, t) {
136 ctx->target_thread = *t;
144 ctx->target_thread = *t;
150 ctx->target_thread.ethread = 0;
151 ctx->target_thread.uniqueid = 0;
159 return ctx->target.uniqueid;
163 return ctx->target_thread.uniqueid;
170 (
ut8 *)&base, 4 <<
ctx->is_64bit)) {
198 free((*ctx)->kernel_module.name);
202 #define PKT_REQ(p) ((kd_req_t *)(((kd_packet_t *)p)->data))
203 #define PKT_STC(p) ((kd_stc_64 *)(((kd_packet_t *)p)->data))
204 #define PKT_IO(p) ((kd_ioc_t *)(((kd_packet_t *)p)->data))
207 static void dump_stc(kd_packet_t *
p) {
210 eprintf (
"New state: %08x\n", stc->state);
212 (
ut64) stc->pc, (
ut64) stc->kthread);
213 eprintf (
"On cpu %i/%i\n", stc->cpu + 1, stc->cpu_count);
217 eprintf (
" Code : %08x\n", stc->exception.code);
218 eprintf (
" Flags : %08x\n", stc->exception.flags);
254 return stc->load_symbols.pathsize &&
255 (stc->load_symbols.pathsize < pkt->length - (
rz_offsetof(kd_stc_64, load_symbols.unload) +
sizeof(stc->load_symbols.unload)));
259 kd_packet_t *pkt =
NULL;
265 bool is_repeated_packet;
275 is_repeated_packet =
ctx->last_received_id == pkt->id;
276 if (is_repeated_packet) {
279 ctx->last_received_id = pkt->id;
282 is_repeated_packet =
true;
285 }
while (is_repeated_packet);
287 if (pkt->type !=
type) {
288 RZ_LOG_DEBUG(
"We were not waiting for this: %02x Expected: %02x\n", pkt->type,
type);
303 RZ_LOG_VERBOSE(stc->load_symbols.unload ?
" Unload Symbols\n" :
" Load Symbols\n");
309 char *
path = (
char *)pkt->data + pkt->length - stc->load_symbols.pathsize;
310 path[stc->load_symbols.pathsize - 1] = 0;
313 ctx->kernel_module.addr = stc->load_symbols.base;
314 ctx->kernel_module.size = stc->load_symbols.size;
341 if (pkt->id ==
ctx->seq_id) {
361 RZ_LOG_DEBUG(
"Waoh. You probably sent a malformed packet!\n");
366 if (pkt->type !=
type) {
369 ctx->breaked =
false;
375 ctx->breaked =
false;
392 const ut8 ptr_size =
ctx->is_64bit ? 8 : 4;
393 const ut64 self = address;
394 const ut64 tag_addr =
self - ptr_size - 4;
396 if (
ctx->read_at_kernel_virtual(
ctx->user, tag_addr,
buf, 4) != 4) {
401 if (memcmp(
buf,
"Vad", 3)) {
406 const bool is_vad_short =
buf[3] ==
'S';
415 if (parent !=
UT64_MAX && (parent_value & ~3) != (parent & ~3)) {
420 if (
ctx->read_at_kernel_virtual(
ctx->user, address,
buf, 4) != 4) {
427 if (
ctx->read_at_kernel_virtual(
ctx->user, address,
buf, 4) != 4) {
433 ut8 start_vpn_high = 0;
434 ut8 end_vpn_high = 0;
436 if (
ctx->read_at_kernel_virtual(
ctx->user, address, &start_vpn_high, 1) != 1) {
441 if (
ctx->read_at_kernel_virtual(
ctx->user, address, &end_vpn_high, 1) != 1) {
448 const ut64 start = (start_vpn | (
ut64)start_vpn_high << 32) << 12;
449 const ut64 end = (((end_vpn | (
ut64)end_vpn_high << 32) + 1) << 12) - 1;
477 if (!
ctx->target.vadroot) {
490 if (!
ctx->read_at_kernel_virtual(
ctx->user, address, &
type, 1)) {
505 proc->eprocess = address;
515 bool current_process_found =
false;
525 if (
ctx->target.eprocess) {
527 goto get_cur_process;
550 if (
proc->eprocess ==
ctx->target.eprocess) {
551 current_process_found =
true;
556 }
while (ptr !=
ctx->PsActiveProcessHead);
558 if (!current_process_found &&
ctx->target.eprocess) {
571 while (address <
end) {
573 const ut32 restOfPage = 0x1000 - (address & 0xfff);
579 address += restOfPage;
620 return ctx->read_at_kernel_virtual(
ctx->user, address,
buf,
count);
631 int list_entry_off = 0;
634 if (!
ctx->PsLoadedModuleList) {
638 ptr =
ctx->PsLoadedModuleList;
640 if (!
ctx->read_at_kernel_virtual(
ctx->user, ptr, (
ut8 *)&ptr, 4 <<
ctx->is_64bit)) {
641 RZ_LOG_ERROR(
"PsLoadedModuleList not present in mappings\n");
648 const ut32 saved_target =
ctx->target.uniqueid;
649 ctx->target.uniqueid = 0;
651 ctx->target.uniqueid = saved_target;
653 if (kernel_modules) {
658 if (!
ctx->target.peb) {
664 ut64 ldroff =
ctx->is_64bit ? 0x18 : 0xC;
673 ut64 mlistoff =
ctx->is_64bit ? 0x20 : 0x14;
675 base = ptr + mlistoff;
680 list_entry_off = (4 <<
ctx->is_64bit) * 2;
685 const ut64 baseoff =
ctx->is_64bit ? 0x30 : 0x18;
686 const ut64 sizeoff =
ctx->is_64bit ? 0x40 : 0x20;
687 const ut64 nameoff =
ctx->is_64bit ? 0x48 : 0x24;
689 ?
ctx->is_64bit ? 0x9c : 0x58
690 :
ctx->is_64bit ? 0x80
703 ptr -= list_entry_off;
717 int align =
ctx->is_64bit ?
sizeof(
ut64) :
sizeof(
ut32);
735 }
while (ptr != base);
741 if (
ctx->profile->build < 9200) {
742 running_offset =
ctx->is_64bit ? 0x49 : 0x39;
744 running_offset =
ctx->is_64bit ? 0x71 : 0x55;
747 if (!
ctx->read_at_kernel_virtual(
ctx->user, address, &
type, 1)) {
765 bool running =
false;
766 if (!
ctx->read_at_kernel_virtual(
ctx->user, address + running_offset, (
ut8 *)&running, 1)) {
767 RZ_LOG_WARN(
"Failed to read KTHREAD.Running at: 0x%" PFMT64x "\n", address + running_offset);
775 thread->
status = running ?
'r' :
's';
785 bool current_thread_found =
false;
786 ptr =
ctx->target.eprocess;
789 if (
ctx->target_thread.ethread) {
800 if (
ctx->target_thread.ethread) {
814 ctx->read_at_kernel_virtual(
ctx->user, ptr, (
ut8 *)&next, 4 <<
ctx->is_64bit);
828 if (thread->
ethread ==
ctx->target_thread.ethread) {
829 current_thread_found =
true;
836 if (!current_thread_found &&
ctx->target_thread.ethread) {
845 #define PTE_VALID 0x0001
846 #define PTE_LARGEPAGE 0x0080
847 #define PTE_PROTOTYPE 0x0400
848 #define ARM_DESCRIPTOR 0x0002
861 ut64 pml4i, pdpi, pdi, pti;
865 pti = (va >> 12) & 0x1ff;
866 pdi = (va >> 21) & 0x1ff;
867 pdpi = (va >> 30) & 0x1ff;
868 pml4i = (va >> 39) & 0x1ff;
870 mask = 0x000000fffffff000;
873 pti = (va >> 12) & 0x1ff;
874 pdi = (va >> 21) & 0x1ff;
875 pdpi = (va >> 30) & 0x3;
878 pti = (va >> 12) & 0x3ff;
879 pdi = (va >> 22) & 0x3ff;
887 tmp = directory_table;
892 if (!
ctx->read_at_physical(
ctx->user,
tmp + pml4i * 8, (
ut8 *)&
tmp, 8)) {
900 if (!
ctx->read_at_physical(
ctx->user,
tmp + pdpi * 8, (
ut8 *)&
tmp, 8)) {
906 const int read_size =
ctx->is_pae ? 8 : 4;
909 if (!
ctx->read_at_physical(
ctx->user,
tmp + pdi * read_size, (
ut8 *)&
tmp, read_size)) {
917 tmp = (tmp << 16) >> 16;
918 *pa =
ctx->is_pae ? (
tmp & (~0x1fffff)) | (va & 0x1fffff) : (
tmp & (~0x3fffff)) | (va & 0x3fffff);
923 if (!
ctx->read_at_physical(
ctx->user, (
tmp &
mask) + pti * read_size, (
ut8 *)&
tmp, read_size)) {
928 *pa = (
tmp &
mask) | (va & 0xfff);
934 RZ_LOG_ERROR(
"Prototype PTE lookup is currently missing!\n");
948 const ut32 cur_seq_id =
ctx->seq_id;
961 if (rr->req !=
req->req) {
962 RZ_LOG_DEBUG(
"Got wrong packet %x for request %x\n", rr->req,
req->req);
964 }
else if ((*pkt)->length <
sizeof(kd_req_t)) {
965 RZ_LOG_DEBUG(
"Got too small of a packet: %u bytes\n", (*pkt)->length);
975 if (ret ==
KD_E_OK && cur_seq_id ==
ctx->seq_id) {
976 RZ_LOG_DEBUG(
"We didn't get and ACK but got the packet\n");
989 RZ_LOG_DEBUG(
"%s : req returned %08x\n", __FUNCTION__, rr->ret);
998 kd_req_t
req = { 0 };
1001 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1014 RZ_LOG_DEBUG(
"Major : %i Minor %i\n", rr->rz_ver.major, rr->rz_ver.minor);
1015 RZ_LOG_DEBUG(
"Protocol version : %i.%i\n", rr->rz_ver.proto_major, rr->rz_ver.proto_minor);
1029 RZ_LOG_ERROR(
"No _KDDEBUGGER_DATA64 pointer has been supplied by the debugee!\n");
1034 ctx->kernel_module.addr = rr->rz_ver.kernel_base;
1043 ctx->windctx.PsLoadedModuleList = rr->rz_ver.mod_addr;
1044 ctx->windctx.KdDebuggerDataBlock = ptr;
1056 ctx->windctx.is_pae = pae_enabled & 1;
1058 if (!
ctx->windctx.profile) {
1059 RZ_LOG_WARN(
"Could not find a suitable profile for the target OS\n");
1069 if (!
ctx || !
ctx->desc) {
1120 ctx->cpu = stc64->cpu;
1121 ctx->cpu_count = stc64->cpu_count;
1122 ctx->windctx.target.eprocess = 0;
1127 ctx->windctx.is_pae = 0;
1128 ctx->windctx.target_thread.ethread = stc64->kthread;
1142 kd_req_t
req = { 0 };
1144 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1149 req.rz_cont.reason = handled ? 0x10001 : 0x80010001;
1152 req.rz_cont.tf = 0x400;
1174 ctx->context_cache_valid =
false;
1180 kd_packet_t *pkt =
NULL;
1181 kd_req_t
req = { 0 };
1183 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1188 if (
size > max_ctx_size) {
1195 const ut64 rest =
RZ_MIN(left, max_ctx_size);
1196 req.rz_ctx_ex.count = rest;
1202 if (
PKT_REQ(pkt)->rz_ctx_ex.count > left) {
1206 left -=
PKT_REQ(pkt)->rz_ctx_ex.count;
1219 if (
size >
ctx->context_cache_size) {
1222 ctx->context_cache_size =
size;
1232 kd_req_t
req = { 0 };
1233 kd_packet_t *pkt =
NULL;
1235 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1239 if (
ctx->context_cache_size >=
size &&
ctx->context_cache_valid) {
1247 req.rz_ctx.flags = 0x1003F;
1254 const size_t context_rq_sz = pkt->length -
sizeof(kd_req_t);
1258 if (context_rq_sz >
ctx->context_cache_size || !
ctx->context_cache) {
1263 ctx->context_cache_size = 0;
1264 ctx->context_cache_valid =
false;
1267 ctx->context_cache =
tmp;
1268 ctx->context_cache_size = context_rq_sz;
1270 memcpy(
ctx->context_cache, rr->data, context_rq_sz);
1271 ctx->context_cache_valid =
true;
1272 ctx->context_cache_valid = context_rq_sz;
1273 return context_rq_sz;
1277 kd_req_t
req = { 0 };
1280 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1288 req.rz_query_mem.address_space = 0;
1301 if (address_space) {
1302 *address_space = rr->rz_query_mem.address_space;
1305 *
flags = rr->rz_query_mem.flags;
1313 kd_req_t
req = { 0 };
1316 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1339 *
handle = rr->rz_set_bp.handle;
1360 const int returned_bytes =
RZ_MIN(rr->rz_mem.read, pkt->length -
sizeof(kd_req_t));
1361 const int read_len =
RZ_MIN(returned_bytes,
RZ_MIN(rr->rz_mem.read, left));
1371 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1385 kd_packet_t *pkt =
NULL;
1386 kd_req_t
req = { 0 };
1388 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1396 req.rz_mem.length = payload;
1403 int ret = rr->rz_mem.read;
1410 kd_req_t
req = { 0 };
1412 if (!
ctx || !
ctx->desc || !
ctx->syncd) {
1424 req.rz_mem.length = payload;
1425 req.rz_mem.read = 0;
1437 int ret = rr->rz_mem.read;
1446 ctx->breaked =
true;
static mcore_handle handle
static RzList * maps(RzBinFile *bf)
int bits(struct state *s, int need)
const lzma_allocator const uint8_t size_t uint8_t * out
RZ_API void rz_cons_break_pop(void)
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user)
RZ_API bool rz_cons_is_breaked(void)
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
static bool is_target_kernel(DbgEngContext *idbg)
static RzBuffer * build(RzEgg *egg)
size_t map(int syms, int left, int len)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API const KEY_TYPE bool * found
int kd_send_ctrl_packet(io_desc_t *desc, const ut32 type, const ut32 id)
int kd_send_data_packet(io_desc_t *desc, const ut32 type, const ut32 id, const ut8 *req, const int req_len, const ut8 *buf, const ut32 buf_len)
int kd_read_packet(io_desc_t *desc, kd_packet_t **p)
KD_PACKET_MANIPULATE_TYPE
@ DbgKdWritePhysicalMemoryApi
@ DbgKdWriteVirtualMemoryApi
@ DbgKdReadPhysicalMemoryApi
@ DbgKdReadVirtualMemoryApi
@ DbgKdWriteBreakPointApi
@ DbgKdRestoreBreakPointApi
@ DbgKdCommandStringStateChange
@ DbgKdLoadSymbolsStateChange
@ DbgKdExceptionStateChange
@ KD_PACKET_TYPE_STATE_MANIPULATE
@ KD_PACKET_TYPE_STATE_CHANGE64
@ KD_PACKET_TYPE_ACKNOWLEDGE
#define KD_INITIAL_PACKET_ID
#define DBGKD_VERS_FLAG_PTR64
#define DBGKD_VERS_FLAG_DATA
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API bool rz_list_join(RZ_NONNULL RzList *list1, RZ_NONNULL RzList *list2)
Joins 2 list into one (list2 pointer needs to be freed by the user)
RZ_API RZ_BORROW void * rz_list_first(RZ_NONNULL const RzList *list)
Returns the first element of the list.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API RZ_BORROW RzListIter * rz_list_add_sorted(RZ_NONNULL RzList *list, void *data, RZ_NONNULL RzListComparator cmp)
Adds an element to a sorted list via the RzListComparator.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
void * realloc(void *ptr, size_t size)
void * malloc(size_t size)
void * calloc(size_t number, size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
static Profile * p_table[]
static ut32 rz_read_le32(const void *src)
#define RZ_LOG_VERBOSE(fmtstr,...)
#define RZ_LOG_INFO(fmtstr,...)
#define RZ_LOG_WARN(fmtstr,...)
#define RZ_LOG_DEBUG(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API int rz_str_utf16_to_utf8(ut8 *dst, int len_dst, const ut8 *src, int len_src, bool little_endian)
RZ_API bool rz_str_endswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string ends with a specifc sequence of characters (case sensitive)
RZ_API char RZ_API void rz_sys_backtrace(void)
Print the backtrace at the point this function is called from.
#define rz_offsetof(type, member)
#define UT64_ADD_OVFCHK(x, y)
static struct sockaddr static addrlen static backlog const void static flags void flags
RZ_API void rz_th_lock_leave(RZ_NONNULL RzThreadLock *thl)
Releases a RzThreadLock structure.
RZ_API void rz_th_lock_free(RZ_NULLABLE RzThreadLock *thl)
Frees a RzThreadLock structure.
RZ_API RZ_OWN RzThreadLock * rz_th_lock_new(bool recursive)
Allocates and initialize a RzThreadLock structure.
RZ_API bool rz_th_lock_tryenter(RZ_NONNULL RzThreadLock *thl)
Tries to acquire a RzThreadLock structure.
int iob_write(io_desc_t *desc, const uint8_t *buf, const uint32_t buf_len)
void error(const char *msg)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
int map_comparator(const void *m1, const void *m2)
bool winkd_va_to_pa(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 directory_table, ut64 va, RZ_BORROW RZ_NONNULL RZ_OUT ut64 *pa)
int winkd_write_at_uva(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address, RZ_BORROW RZ_NONNULL RZ_IN const ut8 *buf, int count)
static int do_io_reply(RZ_BORROW RZ_NONNULL KdCtx *ctx, kd_packet_t *pkt)
ut64 winkd_get_target_base(RZ_BORROW RZ_NONNULL WindCtx *ctx)
int winkd_write_at(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut64 offset, RZ_BORROW RZ_NONNULL RZ_IN const ut8 *buf, const int count)
bool winkd_read_ver(RZ_BORROW RZ_NONNULL KdCtx *ctx)
ut32 winkd_get_target(RZ_BORROW RZ_NONNULL WindCtx *ctx)
WindThread * winkd_get_thread_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address)
bool winkd_lock_leave(RZ_BORROW RZ_NONNULL KdCtx *ctx)
int winkd_write_at_phys(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut64 offset, RZ_BORROW RZ_NONNULL RZ_IN const ut8 *buf, const int count)
static bool load_symbol_path_is_valid(kd_packet_t *pkt)
int winkd_read_at(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut64 offset, RZ_BORROW RZ_NONNULL RZ_OUT ut8 *buf, const int count)
Profile * winkd_get_profile(int bits, int build, int sp)
static bool winkd_send_state_manipulate_req(RZ_BORROW RZ_NONNULL KdCtx *ctx, kd_req_t *req, RZ_BORROW RZ_NULLABLE RZ_IN const ut8 *buf, const ut32 buf_len, RZ_BORROW RZ_NULLABLE RZ_OUT kd_packet_t **pkt)
RzList * winkd_list_threads(RZ_BORROW RZ_NONNULL WindCtx *ctx)
void winkd_break(void *arg)
int winkd_wait_packet(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut32 type, RZ_NULLABLE RZ_OUT kd_packet_t **p)
int winkd_get_cpus(RZ_BORROW RZ_NONNULL KdCtx *ctx)
void winkd_kdctx_free(RZ_OWN KdCtx **ctx)
int winkd_get_cpu(RZ_BORROW RZ_NONNULL KdCtx *ctx)
int winkd_read_reg(RZ_BORROW RZ_NONNULL KdCtx *ctx, RZ_BORROW RZ_NONNULL RZ_OUT ut8 *buf, int size)
RzList * winkd_list_maps(RZ_BORROW RZ_NONNULL WindCtx *ctx)
int winkd_get_sp(RZ_BORROW RZ_NONNULL WindCtx *ctx)
bool winkd_write_reg(RZ_BORROW RZ_NONNULL KdCtx *ctx, ut32 flags, RZ_BORROW RZ_NONNULL RZ_IN const ut8 *buf, int size)
int winkd_read_at_uva(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address, RZ_BORROW RZ_NONNULL RZ_OUT ut8 *buf, int count)
void winkd_windmodule_free(void *ptr)
ut32 winkd_get_target_thread(RZ_BORROW RZ_NONNULL WindCtx *ctx)
RzList * winkd_list_modules(RZ_BORROW RZ_NONNULL WindCtx *ctx)
static int read_at_uva_or_kernel(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address, ut8 *buf, int count)
bool winkd_set_cpu(RZ_BORROW RZ_NONNULL KdCtx *ctx, int cpu)
int winkd_read_at_phys(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut64 offset, RZ_BORROW RZ_NONNULL RZ_OUT ut8 *buf, const int count)
int winkd_op_at_uva(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address, ut8 *buf, int count, bool write)
int winkd_continue(RZ_BORROW RZ_NONNULL KdCtx *ctx, bool handled)
static int read_at(RZ_BORROW RZ_NONNULL KdCtx *ctx, enum KD_PACKET_MANIPULATE_TYPE type, ut8 *buf, const ut64 offset, const int count)
bool winkd_set_target(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut32 pid, ut32 tid)
void winkd_walk_vadtree(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address, ut64 parent, RzList *out)
KdCtx * winkd_kdctx_new(RZ_BORROW RZ_NONNULL io_desc_t *desc)
bool winkd_lock_enter(RZ_BORROW RZ_NONNULL KdCtx *ctx)
int winkd_sync(RZ_BORROW RZ_NONNULL KdCtx *ctx)
int winkd_query_mem(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut64 addr, int *address_space, int *flags)
static bool is_page_large(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 page_descriptor)
WindProc * winkd_get_process_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, ut64 address)
int winkd_bkpt(RZ_BORROW RZ_NONNULL KdCtx *ctx, const ut64 addr, const int set, const int hw, RZ_BORROW RZ_NONNULL int *handle)
RzList * winkd_list_process(RZ_BORROW RZ_NONNULL WindCtx *ctx)
int winkd_get_bits(RZ_BORROW RZ_NONNULL WindCtx *ctx)
static void winkd_ctx_fini(RZ_BORROW RZ_NONNULL WindCtx *ctx)
static ut64 winkd_read_ptr_at(RZ_BORROW RZ_NONNULL WindCtx *ctx, RZ_BORROW RZ_NONNULL WindReadAt *read_at_func, ut64 at)