winedbg: Adjust the parameters of the backend read/write routines to
match those of ReadProcessMemory/WriteProcessMemory, since those are the ones actually used.
This commit is contained in:
parent
5d88b27d0d
commit
f0279726eb
|
@ -87,7 +87,7 @@ static unsigned be_alpha_insert_Xpoint(HANDLE hProcess, const struct be_process_
|
|||
void* addr, unsigned long* val, unsigned size)
|
||||
{
|
||||
unsigned long xbp;
|
||||
unsigned long sz;
|
||||
SIZE_T sz;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
@ -467,7 +467,7 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i
|
|||
void* addr, unsigned long* val, unsigned size)
|
||||
{
|
||||
unsigned char ch;
|
||||
unsigned long sz;
|
||||
SIZE_T sz;
|
||||
unsigned long* pr;
|
||||
int reg;
|
||||
unsigned long bits;
|
||||
|
@ -517,7 +517,7 @@ static unsigned be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_i
|
|||
CONTEXT* ctx, enum be_xpoint_type type,
|
||||
void* addr, unsigned long val, unsigned size)
|
||||
{
|
||||
unsigned long sz;
|
||||
SIZE_T sz;
|
||||
unsigned char ch;
|
||||
|
||||
switch (type)
|
||||
|
|
|
@ -100,7 +100,7 @@ static unsigned be_ppc_insert_Xpoint(HANDLE hProcess, const struct be_process_io
|
|||
void* addr, unsigned long* val, unsigned size)
|
||||
{
|
||||
unsigned long xbp;
|
||||
unsigned long sz;
|
||||
SIZE_T sz;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ static unsigned be_ppc_remove_Xpoint(HANDLE hProcess, const struct be_process_io
|
|||
CONTEXT* ctx, enum be_xpoint_type type,
|
||||
void* addr, unsigned long val, unsigned size)
|
||||
{
|
||||
unsigned long sz;
|
||||
SIZE_T sz;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
@ -218,8 +218,8 @@ struct dbg_process
|
|||
struct be_process_io
|
||||
{
|
||||
BOOL (*close_process)(struct dbg_process*, BOOL);
|
||||
BOOL (WINAPI *read)(HANDLE, const void*, void*, DWORD, DWORD*);
|
||||
BOOL (WINAPI *write)(HANDLE, void*, const void*, DWORD, DWORD*);
|
||||
BOOL (WINAPI *read)(HANDLE, const void*, void*, SIZE_T, SIZE_T*);
|
||||
BOOL (WINAPI *write)(HANDLE, void*, const void*, SIZE_T, SIZE_T*);
|
||||
};
|
||||
|
||||
extern struct dbg_process* dbg_curr_process;
|
||||
|
|
|
@ -1302,7 +1302,7 @@ static enum packet_return packet_read_memory(struct gdb_context* gdbctx)
|
|||
char *addr;
|
||||
unsigned int len, blk_len, nread;
|
||||
char buffer[32];
|
||||
unsigned long r = 0;
|
||||
SIZE_T r = 0;
|
||||
|
||||
assert(gdbctx->in_trap);
|
||||
/* FIXME:check in_packet_len for reading %p,%x */
|
||||
|
@ -1334,7 +1334,7 @@ static enum packet_return packet_write_memory(struct gdb_context* gdbctx)
|
|||
unsigned int len, blk_len;
|
||||
char* ptr;
|
||||
char buffer[32];
|
||||
unsigned long w;
|
||||
SIZE_T w;
|
||||
|
||||
assert(gdbctx->in_trap);
|
||||
ptr = memchr(gdbctx->in_packet, ':', gdbctx->in_packet_len);
|
||||
|
|
|
@ -231,7 +231,7 @@ void memory_examine(const struct dbg_lvalue *lvalue, int count, char format)
|
|||
BOOL memory_get_string(struct dbg_process* pcs, void* addr, BOOL in_debuggee,
|
||||
BOOL unicode, char* buffer, int size)
|
||||
{
|
||||
DWORD sz;
|
||||
SIZE_T sz;
|
||||
WCHAR* buffW;
|
||||
|
||||
buffer[0] = 0;
|
||||
|
@ -262,7 +262,7 @@ BOOL memory_get_string(struct dbg_process* pcs, void* addr, BOOL in_debuggee,
|
|||
BOOL memory_get_string_indirect(struct dbg_process* pcs, void* addr, BOOL unicode, char* buffer, int size)
|
||||
{
|
||||
void* ad;
|
||||
DWORD sz;
|
||||
SIZE_T sz;
|
||||
|
||||
buffer[0] = 0;
|
||||
if (addr &&
|
||||
|
|
|
@ -127,9 +127,14 @@ BOOL stack_get_current_symbol(SYMBOL_INFO* symbol)
|
|||
static BOOL CALLBACK stack_read_mem(HANDLE hProc, DWORD addr,
|
||||
PVOID buffer, DWORD size, PDWORD written)
|
||||
{
|
||||
SIZE_T sz;
|
||||
BOOL ret;
|
||||
|
||||
struct dbg_process* pcs = dbg_get_process_h(hProc);
|
||||
if (!pcs) return FALSE;
|
||||
return pcs->process_io->read(hProc, (const void*)addr, buffer, size, written);
|
||||
ret = pcs->process_io->read(hProc, (const void*)addr, buffer, size, &sz);
|
||||
if (written != NULL) *written = sz;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
Loading…
Reference in New Issue