96 #define KD_PACKET_UNUSED 0x00000000
97 #define KD_PACKET_DATA 0x30303030
98 #define KD_PACKET_CTRL 0x69696969
100 #define KD_INITIAL_PACKET_ID 0x80800000
102 #define KD_MAX_PAYLOAD 0x480
103 #define KD_PACKET_MAX_SIZE 4000
106 #define KD_RET_OK 0x00000000
107 #define KD_RET_ERR 0xC0000001
108 #define KD_RET_ENOENT 0xC000000F
110 #define KD_MACH_I386 0x014C
111 #define KD_MACH_IA64 0x0200
112 #define KD_MACH_AMD64 0x8664
113 #define KD_MACH_ARM 0x01c0
114 #define KD_MACH_EBC 0x0EBC
116 #define DBGKD_VERS_FLAG_DATA 0x0002
117 #define DBGKD_VERS_FLAG_PTR64 0x0004
120 typedef struct kd_req_t {
194 #define KD_EXC_BKPT 0x80000003
196 typedef struct kd_stc_64 {
234 typedef struct kd_packet_t {
246 #define KDNET_MAGIC 0x4d444247
247 #define KDNET_HMACKEY_SIZE 32
248 #define KDNET_HMAC_SIZE 16
250 #define KDNET_PACKET_TYPE_DATA 0
251 #define KDNET_PACKET_TYPE_CONTROL 1
254 typedef struct kdnet_packet_t {
262 #define KDNET_DATA_SIZE 8
263 #define KDNET_DATA_DIRECTION_MASK 0x80
264 #define KDNET_DATA_PADSIZE_MASK 0x7F
265 #define KDNET_DATA_SEQNO_MASK 0xFFFFFF00
269 #define ASSERT_CONCAT_(a, b) a##b
270 #define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b)
271 #define ct_assert(e) enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1 / (!!(e)) }
static mcore_handle handle
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 length
ut32 kd_data_checksum(const ut8 *buf, const ut64 buf_len)
int kd_send_ctrl_packet(io_desc_t *desc, const ut32 type, const ut32 id)
KD_PACKET_MANIPULATE_TYPE
@ DbgKdWritePhysicalMemoryApi
@ DbgKdRestoreBreakPointExApi
@ DbgKdWriteVirtualMemoryApi
@ DbgKdWriteMachineSpecificRegister
@ DbgKdReadPhysicalMemoryApi
@ DbgKdReadIoSpaceExtendedApi
@ DbgKdSetInternalBreakPointApi
@ DbgKdWriteControlSpaceApi
@ DbgKdReadControlSpaceApi
@ DbgKdReadVirtualMemoryApi
@ DbgKdGetInternalBreakPointApi
@ DbgKdWriteBreakPointApi
@ DbgKdClearAllInternalBreakpointsApi
@ DbgKdWriteCustomBreakpointApi
@ DbgKdQuerySpecialCallsApi
@ DbgKdClearSpecialCallsApi
@ DbgKdWriteIoSpaceExtendedApi
@ DbgKdRestoreBreakPointApi
@ DbgKdWriteBreakPointExApi
@ DbgKdReadMachineSpecificRegister
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)
KD_PACKET_WAIT_STATE_CHANGE
@ DbgKdMinimumStateChange
@ DbgKdCommandStringStateChange
@ DbgKdLoadSymbolsStateChange
@ DbgKdExceptionStateChange
@ DbgKdMaximumStateChange
int kd_read_packet(io_desc_t *desc, kd_packet_t **p)
bool kd_packet_is_valid(const kd_packet_t *p)
@ KD_PACKET_TYPE_STATE_MANIPULATE
@ KD_PACKET_TYPE_STATE_CHANGE64
@ KD_PACKET_TYPE_TRACE_IO
@ KD_PACKET_TYPE_POLL_BREAKIN
@ KD_PACKET_TYPE_DEBUG_IO
@ KD_PACKET_TYPE_ACKNOWLEDGE
@ KD_PACKET_TYPE_STATE_CHANGE32
@ KD_PACKET_TYPE_CONTROL_REQUEST
RZ_PACKED(typedef struct kd_req_t { ut32 req;ut16 cpu_level;ut16 cpu;ut32 ret;ut32 pad;union { RZ_PACKED(struct { ut64 addr;ut32 length;ut32 read;}) rz_mem;RZ_PACKED(struct { ut16 major;ut16 minor;ut8 proto_major;ut8 proto_minor;ut16 flags;ut16 machine;ut8 misc[6];ut64 kernel_base;ut64 mod_addr;ut64 dbg_addr;}) rz_ver;struct { ut32 reason;ut32 tf;ut32 dr7;ut32 css;ut32 cse;} rz_cont;struct { ut64 addr;ut32 handle;} rz_set_bp;struct { ut32 handle;} rz_del_bp;struct { ut64 addr;ut32 flags;} rz_set_ibp;struct { ut64 addr;ut32 flags;ut32 calls;} rz_get_ibp;struct { ut32 flags;} rz_ctx;struct { ut32 offset;ut32 count;ut32 copied;} rz_ctx_ex;struct { ut64 addr;ut64 reserved;ut32 address_space;ut32 flags;} rz_query_mem;ut8 raw[40];};ut8 data[];}) kd_req_t
int kd_packet_is_ack(const kd_packet_t *p)
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
static void pad(RzStrBuf *sb, ut32 count)
static struct sockaddr static addrlen static backlog const void static flags void flags
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
int read(izstream &zs, T *x, Items items)