Commit f23cb66d authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

winedbg: Use BOOL type where appropriate.

parent baf4757c
...@@ -1658,7 +1658,7 @@ void be_arm_disasm_one_insn(ADDRESS64 *addr, int display) ...@@ -1658,7 +1658,7 @@ void be_arm_disasm_one_insn(ADDRESS64 *addr, int display)
} }
} }
static unsigned be_arm_get_addr(HANDLE hThread, const CONTEXT* ctx, static BOOL be_arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum be_cpu_addr bca, ADDRESS64* addr) enum be_cpu_addr bca, ADDRESS64* addr)
{ {
switch (bca) switch (bca)
...@@ -1673,7 +1673,7 @@ static unsigned be_arm_get_addr(HANDLE hThread, const CONTEXT* ctx, ...@@ -1673,7 +1673,7 @@ static unsigned be_arm_get_addr(HANDLE hThread, const CONTEXT* ctx,
return FALSE; return FALSE;
} }
static unsigned be_arm_get_register_info(int regno, enum be_cpu_addr* kind) static BOOL be_arm_get_register_info(int regno, enum be_cpu_addr* kind)
{ {
switch (regno) switch (regno)
{ {
...@@ -1755,35 +1755,35 @@ static struct dbg_internal_var be_arm_ctx[] = ...@@ -1755,35 +1755,35 @@ static struct dbg_internal_var be_arm_ctx[] =
{0, NULL, 0, dbg_itype_none} {0, NULL, 0, dbg_itype_none}
}; };
static unsigned be_arm_is_step_over_insn(const void* insn) static BOOL be_arm_is_step_over_insn(const void* insn)
{ {
dbg_printf("be_arm_is_step_over_insn: not done\n"); dbg_printf("be_arm_is_step_over_insn: not done\n");
return FALSE; return FALSE;
} }
static unsigned be_arm_is_function_return(const void* insn) static BOOL be_arm_is_function_return(const void* insn)
{ {
dbg_printf("be_arm_is_function_return: not done\n"); dbg_printf("be_arm_is_function_return: not done\n");
return FALSE; return FALSE;
} }
static unsigned be_arm_is_break_insn(const void* insn) static BOOL be_arm_is_break_insn(const void* insn)
{ {
dbg_printf("be_arm_is_break_insn: not done\n"); dbg_printf("be_arm_is_break_insn: not done\n");
return FALSE; return FALSE;
} }
static unsigned be_arm_is_func_call(const void* insn, ADDRESS64* callee) static BOOL be_arm_is_func_call(const void* insn, ADDRESS64* callee)
{ {
return FALSE; return FALSE;
} }
static unsigned be_arm_is_jump(const void* insn, ADDRESS64* jumpee) static BOOL be_arm_is_jump(const void* insn, ADDRESS64* jumpee)
{ {
return FALSE; return FALSE;
} }
static unsigned be_arm_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_arm_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long* val, unsigned size) void* addr, unsigned long* val, unsigned size)
{ {
...@@ -1792,16 +1792,16 @@ static unsigned be_arm_insert_Xpoint(HANDLE hProcess, const struct be_process_io ...@@ -1792,16 +1792,16 @@ static unsigned be_arm_insert_Xpoint(HANDLE hProcess, const struct be_process_io
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (!size) return 0; if (!size) return FALSE;
if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return 0; if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return FALSE;
default: default:
dbg_printf("Unknown/unsupported bp type %c\n", type); dbg_printf("Unknown/unsupported bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_arm_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_arm_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long val, unsigned size) void* addr, unsigned long val, unsigned size)
{ {
...@@ -1810,17 +1810,17 @@ static unsigned be_arm_remove_Xpoint(HANDLE hProcess, const struct be_process_io ...@@ -1810,17 +1810,17 @@ static unsigned be_arm_remove_Xpoint(HANDLE hProcess, const struct be_process_io
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (!size) return 0; if (!size) return FALSE;
if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return 0; if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return FALSE;
break; break;
default: default:
dbg_printf("Unknown/unsupported bp type %c\n", type); dbg_printf("Unknown/unsupported bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_arm_is_watchpoint_set(const CONTEXT* ctx, unsigned idx) static BOOL be_arm_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
{ {
dbg_printf("be_arm_is_watchpoint_set: not done\n"); dbg_printf("be_arm_is_watchpoint_set: not done\n");
return FALSE; return FALSE;
...@@ -1844,8 +1844,8 @@ static int be_arm_adjust_pc_for_break(CONTEXT* ctx, BOOL way) ...@@ -1844,8 +1844,8 @@ static int be_arm_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
return step; return step;
} }
static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG* ret) BOOL is_signed, LONGLONG* ret)
{ {
if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE; if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE;
...@@ -1864,7 +1864,7 @@ static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, ...@@ -1864,7 +1864,7 @@ static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
return TRUE; return TRUE;
} }
static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
long double* ret) long double* ret)
{ {
char tmp[sizeof(long double)]; char tmp[sizeof(long double)];
...@@ -1882,8 +1882,8 @@ static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, ...@@ -1882,8 +1882,8 @@ static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
return TRUE; return TRUE;
} }
static int be_arm_store_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_arm_store_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG val) BOOL is_signed, LONGLONG val)
{ {
/* this is simple if we're on a little endian CPU */ /* this is simple if we're on a little endian CPU */
return memory_write_value(lvalue, size, &val); return memory_write_value(lvalue, size, &val);
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#if defined(__aarch64__) && !defined(__AARCH64EB__) #if defined(__aarch64__) && !defined(__AARCH64EB__)
static unsigned be_arm64_get_addr(HANDLE hThread, const CONTEXT* ctx, static BOOL be_arm64_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum be_cpu_addr bca, ADDRESS64* addr) enum be_cpu_addr bca, ADDRESS64* addr)
{ {
switch (bca) switch (bca)
...@@ -38,7 +38,7 @@ static unsigned be_arm64_get_addr(HANDLE hThread, const CONTEXT* ctx, ...@@ -38,7 +38,7 @@ static unsigned be_arm64_get_addr(HANDLE hThread, const CONTEXT* ctx,
return FALSE; return FALSE;
} }
static unsigned be_arm64_get_register_info(int regno, enum be_cpu_addr* kind) static BOOL be_arm64_get_register_info(int regno, enum be_cpu_addr* kind)
{ {
switch (regno) switch (regno)
{ {
...@@ -142,35 +142,35 @@ static struct dbg_internal_var be_arm64_ctx[] = ...@@ -142,35 +142,35 @@ static struct dbg_internal_var be_arm64_ctx[] =
{0, NULL, 0, dbg_itype_none} {0, NULL, 0, dbg_itype_none}
}; };
static unsigned be_arm64_is_step_over_insn(const void* insn) static BOOL be_arm64_is_step_over_insn(const void* insn)
{ {
dbg_printf("be_arm64_is_step_over_insn: not done\n"); dbg_printf("be_arm64_is_step_over_insn: not done\n");
return FALSE; return FALSE;
} }
static unsigned be_arm64_is_function_return(const void* insn) static BOOL be_arm64_is_function_return(const void* insn)
{ {
dbg_printf("be_arm64_is_function_return: not done\n"); dbg_printf("be_arm64_is_function_return: not done\n");
return FALSE; return FALSE;
} }
static unsigned be_arm64_is_break_insn(const void* insn) static BOOL be_arm64_is_break_insn(const void* insn)
{ {
dbg_printf("be_arm64_is_break_insn: not done\n"); dbg_printf("be_arm64_is_break_insn: not done\n");
return FALSE; return FALSE;
} }
static unsigned be_arm64_is_func_call(const void* insn, ADDRESS64* callee) static BOOL be_arm64_is_func_call(const void* insn, ADDRESS64* callee)
{ {
return FALSE; return FALSE;
} }
static unsigned be_arm64_is_jump(const void* insn, ADDRESS64* jumpee) static BOOL be_arm64_is_jump(const void* insn, ADDRESS64* jumpee)
{ {
return FALSE; return FALSE;
} }
static unsigned be_arm64_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_arm64_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long* val, unsigned size) void* addr, unsigned long* val, unsigned size)
{ {
...@@ -179,16 +179,16 @@ static unsigned be_arm64_insert_Xpoint(HANDLE hProcess, const struct be_process_ ...@@ -179,16 +179,16 @@ static unsigned be_arm64_insert_Xpoint(HANDLE hProcess, const struct be_process_
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (!size) return 0; if (!size) return FALSE;
if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return 0; if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return FALSE;
default: default:
dbg_printf("Unknown/unsupported bp type %c\n", type); dbg_printf("Unknown/unsupported bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_arm64_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_arm64_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long val, unsigned size) void* addr, unsigned long val, unsigned size)
{ {
...@@ -197,17 +197,17 @@ static unsigned be_arm64_remove_Xpoint(HANDLE hProcess, const struct be_process_ ...@@ -197,17 +197,17 @@ static unsigned be_arm64_remove_Xpoint(HANDLE hProcess, const struct be_process_
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (!size) return 0; if (!size) return FALSE;
if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return 0; if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return FALSE;
break; break;
default: default:
dbg_printf("Unknown/unsupported bp type %c\n", type); dbg_printf("Unknown/unsupported bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_arm64_is_watchpoint_set(const CONTEXT* ctx, unsigned idx) static BOOL be_arm64_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
{ {
dbg_printf("be_arm64_is_watchpoint_set: not done\n"); dbg_printf("be_arm64_is_watchpoint_set: not done\n");
return FALSE; return FALSE;
...@@ -229,8 +229,8 @@ static int be_arm64_adjust_pc_for_break(CONTEXT* ctx, BOOL way) ...@@ -229,8 +229,8 @@ static int be_arm64_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
return 4; return 4;
} }
static int be_arm64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_arm64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG* ret) BOOL is_signed, LONGLONG* ret)
{ {
if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE; if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE;
...@@ -249,7 +249,7 @@ static int be_arm64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size ...@@ -249,7 +249,7 @@ static int be_arm64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size
return TRUE; return TRUE;
} }
static int be_arm64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_arm64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
long double* ret) long double* ret)
{ {
char tmp[sizeof(long double)]; char tmp[sizeof(long double)];
...@@ -267,8 +267,8 @@ static int be_arm64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, ...@@ -267,8 +267,8 @@ static int be_arm64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
return TRUE; return TRUE;
} }
static int be_arm64_store_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_arm64_store_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG val) BOOL is_signed, LONGLONG val)
{ {
/* this is simple if we're on a little endian CPU */ /* this is simple if we're on a little endian CPU */
return memory_write_value(lvalue, size, &val); return memory_write_value(lvalue, size, &val);
......
...@@ -37,17 +37,17 @@ struct backend_cpu ...@@ -37,17 +37,17 @@ struct backend_cpu
* in an ADDRESS64 (except an linear one). * in an ADDRESS64 (except an linear one).
* Non segmented CPU shall use be_cpu_build_addr * Non segmented CPU shall use be_cpu_build_addr
*/ */
unsigned (*build_addr)(HANDLE hThread, const CONTEXT* ctx, BOOL (*build_addr)(HANDLE hThread, const CONTEXT* ctx,
ADDRESS64* addr, unsigned seg, ADDRESS64* addr, unsigned seg,
unsigned long offset); unsigned long offset);
/* Retrieves in addr an address related to the context (program counter, stack /* Retrieves in addr an address related to the context (program counter, stack
* pointer, frame pointer) * pointer, frame pointer)
*/ */
unsigned (*get_addr)(HANDLE hThread, const CONTEXT* ctx, BOOL (*get_addr)(HANDLE hThread, const CONTEXT* ctx,
enum be_cpu_addr, ADDRESS64* addr); enum be_cpu_addr, ADDRESS64* addr);
/* returns which kind of information a given register number refers to */ /* returns which kind of information a given register number refers to */
unsigned (*get_register_info)(int regno, enum be_cpu_addr* kind); BOOL (*get_register_info)(int regno, enum be_cpu_addr* kind);
/* ------------------------------------------------------------------------------- /* -------------------------------------------------------------------------------
* context manipulation * context manipulation
...@@ -69,17 +69,17 @@ struct backend_cpu ...@@ -69,17 +69,17 @@ struct backend_cpu
/* Check whether the instruction at addr is an insn to step over /* Check whether the instruction at addr is an insn to step over
* (like function call, interruption...) * (like function call, interruption...)
*/ */
unsigned (*is_step_over_insn)(const void* addr); BOOL (*is_step_over_insn)(const void* addr);
/* Check whether instruction at 'addr' is the return from a function call */ /* Check whether instruction at 'addr' is the return from a function call */
unsigned (*is_function_return)(const void* addr); BOOL (*is_function_return)(const void* addr);
/* Check whether instruction at 'addr' is the CPU break instruction. On i386, /* Check whether instruction at 'addr' is the CPU break instruction. On i386,
* it's INT3 (0xCC) * it's INT3 (0xCC)
*/ */
unsigned (*is_break_insn)(const void*); BOOL (*is_break_insn)(const void*);
/* Check whether instruction at 'addr' is a function call */ /* Check whether instruction at 'addr' is a function call */
unsigned (*is_function_call)(const void* insn, ADDRESS64* callee); BOOL (*is_function_call)(const void* insn, ADDRESS64* callee);
/* Check whether instruction at 'addr' is a jump */ /* Check whether instruction at 'addr' is a jump */
unsigned (*is_jump)(const void* insn, ADDRESS64* jumpee); BOOL (*is_jump)(const void* insn, ADDRESS64* jumpee);
/* Ask for disassembling one instruction. If display is true, assembly code /* Ask for disassembling one instruction. If display is true, assembly code
* will be printed. In all cases, 'addr' is advanced at next instruction * will be printed. In all cases, 'addr' is advanced at next instruction
*/ */
...@@ -88,15 +88,15 @@ struct backend_cpu ...@@ -88,15 +88,15 @@ struct backend_cpu
* break points / watchpoints handling * break points / watchpoints handling
* -------------------------------------------------------------------------------*/ * -------------------------------------------------------------------------------*/
/* Inserts an Xpoint in the CPU context and/or debuggee address space */ /* Inserts an Xpoint in the CPU context and/or debuggee address space */
unsigned (*insert_Xpoint)(HANDLE hProcess, const struct be_process_io* pio, BOOL (*insert_Xpoint)(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long* val, unsigned size); void* addr, unsigned long* val, unsigned size);
/* Removes an Xpoint in the CPU context and/or debuggee address space */ /* Removes an Xpoint in the CPU context and/or debuggee address space */
unsigned (*remove_Xpoint)(HANDLE hProcess, const struct be_process_io* pio, BOOL (*remove_Xpoint)(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long val, unsigned size); void* addr, unsigned long val, unsigned size);
/* Checks whether a given watchpoint has been triggered */ /* Checks whether a given watchpoint has been triggered */
unsigned (*is_watchpoint_set)(const CONTEXT* ctx, unsigned idx); BOOL (*is_watchpoint_set)(const CONTEXT* ctx, unsigned idx);
/* Clears the watchpoint indicator */ /* Clears the watchpoint indicator */
void (*clear_watchpoint)(CONTEXT* ctx, unsigned idx); void (*clear_watchpoint)(CONTEXT* ctx, unsigned idx);
/* After a break instruction is executed, in the corresponding exception handler, /* After a break instruction is executed, in the corresponding exception handler,
...@@ -109,16 +109,16 @@ struct backend_cpu ...@@ -109,16 +109,16 @@ struct backend_cpu
* basic type read/write * basic type read/write
* -------------------------------------------------------------------------------*/ * -------------------------------------------------------------------------------*/
/* Reads an integer from memory and stores it inside a long long int */ /* Reads an integer from memory and stores it inside a long long int */
int (*fetch_integer)(const struct dbg_lvalue* lvalue, unsigned size, unsigned is_signed, LONGLONG*); BOOL (*fetch_integer)(const struct dbg_lvalue* lvalue, unsigned size, BOOL is_signed, LONGLONG*);
/* Reads a real from memory and stores it inside a long double */ /* Reads a real from memory and stores it inside a long double */
int (*fetch_float)(const struct dbg_lvalue* lvalue, unsigned size, long double*); BOOL (*fetch_float)(const struct dbg_lvalue* lvalue, unsigned size, long double*);
/* Writes an integer to memory */ /* Writes an integer to memory */
int (*store_integer)(const struct dbg_lvalue* lvalue, unsigned size, unsigned is_signed, LONGLONG); BOOL (*store_integer)(const struct dbg_lvalue* lvalue, unsigned size, BOOL is_signed, LONGLONG);
}; };
extern struct backend_cpu* be_cpu; extern struct backend_cpu* be_cpu;
/* some handy functions for non segmented CPUs */ /* some handy functions for non segmented CPUs */
void* be_cpu_linearize(HANDLE hThread, const ADDRESS64*); void* be_cpu_linearize(HANDLE hThread, const ADDRESS64*);
unsigned be_cpu_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr, BOOL be_cpu_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr,
unsigned seg, unsigned long offset); unsigned seg, unsigned long offset);
...@@ -69,7 +69,7 @@ static void* be_i386_linearize(HANDLE hThread, const ADDRESS64* addr) ...@@ -69,7 +69,7 @@ static void* be_i386_linearize(HANDLE hThread, const ADDRESS64* addr)
return NULL; return NULL;
} }
static unsigned be_i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr, static BOOL be_i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr,
unsigned seg, unsigned long offset) unsigned seg, unsigned long offset)
{ {
addr->Mode = AddrModeFlat; addr->Mode = AddrModeFlat;
...@@ -95,7 +95,7 @@ static unsigned be_i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64 ...@@ -95,7 +95,7 @@ static unsigned be_i386_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64
return TRUE; return TRUE;
} }
static unsigned be_i386_get_addr(HANDLE hThread, const CONTEXT* ctx, static BOOL be_i386_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum be_cpu_addr bca, ADDRESS64* addr) enum be_cpu_addr bca, ADDRESS64* addr)
{ {
switch (bca) switch (bca)
...@@ -110,7 +110,7 @@ static unsigned be_i386_get_addr(HANDLE hThread, const CONTEXT* ctx, ...@@ -110,7 +110,7 @@ static unsigned be_i386_get_addr(HANDLE hThread, const CONTEXT* ctx,
return FALSE; return FALSE;
} }
static unsigned be_i386_get_register_info(int regno, enum be_cpu_addr* kind) static BOOL be_i386_get_register_info(int regno, enum be_cpu_addr* kind)
{ {
switch (regno) switch (regno)
{ {
...@@ -290,7 +290,7 @@ static struct dbg_internal_var be_i386_ctx[] = ...@@ -290,7 +290,7 @@ static struct dbg_internal_var be_i386_ctx[] =
{0, NULL, 0, dbg_itype_none} {0, NULL, 0, dbg_itype_none}
}; };
static unsigned be_i386_is_step_over_insn(const void* insn) static BOOL be_i386_is_step_over_insn(const void* insn)
{ {
BYTE ch; BYTE ch;
...@@ -349,7 +349,7 @@ static unsigned be_i386_is_step_over_insn(const void* insn) ...@@ -349,7 +349,7 @@ static unsigned be_i386_is_step_over_insn(const void* insn)
} }
} }
static unsigned be_i386_is_function_return(const void* insn) static BOOL be_i386_is_function_return(const void* insn)
{ {
BYTE ch; BYTE ch;
...@@ -362,7 +362,7 @@ static unsigned be_i386_is_function_return(const void* insn) ...@@ -362,7 +362,7 @@ static unsigned be_i386_is_function_return(const void* insn)
return (ch == 0xC2) || (ch == 0xC3); return (ch == 0xC2) || (ch == 0xC3);
} }
static unsigned be_i386_is_break_insn(const void* insn) static BOOL be_i386_is_break_insn(const void* insn)
{ {
BYTE c; BYTE c;
...@@ -402,7 +402,7 @@ static BOOL fetch_value(const char* addr, unsigned sz, int* value) ...@@ -402,7 +402,7 @@ static BOOL fetch_value(const char* addr, unsigned sz, int* value)
return TRUE; return TRUE;
} }
static unsigned be_i386_is_func_call(const void* insn, ADDRESS64* callee) static BOOL be_i386_is_func_call(const void* insn, ADDRESS64* callee)
{ {
BYTE ch; BYTE ch;
int delta; int delta;
...@@ -545,7 +545,7 @@ static unsigned be_i386_is_func_call(const void* insn, ADDRESS64* callee) ...@@ -545,7 +545,7 @@ static unsigned be_i386_is_func_call(const void* insn, ADDRESS64* callee)
} }
} }
static unsigned be_i386_is_jump(const void* insn, ADDRESS64* jumpee) static BOOL be_i386_is_jump(const void* insn, ADDRESS64* jumpee)
{ {
BYTE ch; BYTE ch;
int delta; int delta;
...@@ -633,7 +633,7 @@ static inline int be_i386_get_unused_DR(CONTEXT* ctx, DWORD** r) ...@@ -633,7 +633,7 @@ static inline int be_i386_get_unused_DR(CONTEXT* ctx, DWORD** r)
return -1; return -1;
} }
static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long* val, unsigned size) void* addr, unsigned long* val, unsigned size)
{ {
...@@ -646,11 +646,11 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i ...@@ -646,11 +646,11 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (size != 0) return 0; if (size != 0) return FALSE;
if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
*val = ch; *val = ch;
ch = 0xcc; ch = 0xcc;
if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
break; break;
case be_xpoint_watch_exec: case be_xpoint_watch_exec:
bits = DR7_RW_EXECUTE; bits = DR7_RW_EXECUTE;
...@@ -661,14 +661,14 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i ...@@ -661,14 +661,14 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i
case be_xpoint_watch_write: case be_xpoint_watch_write:
bits = DR7_RW_WRITE; bits = DR7_RW_WRITE;
hw_bp: hw_bp:
if ((reg = be_i386_get_unused_DR(ctx, &pr)) == -1) return 0; if ((reg = be_i386_get_unused_DR(ctx, &pr)) == -1) return FALSE;
*pr = (DWORD)addr; *pr = (DWORD)addr;
if (type != be_xpoint_watch_exec) switch (size) if (type != be_xpoint_watch_exec) switch (size)
{ {
case 4: bits |= DR7_LEN_4; break; case 4: bits |= DR7_LEN_4; break;
case 2: bits |= DR7_LEN_2; break; case 2: bits |= DR7_LEN_2; break;
case 1: bits |= DR7_LEN_1; break; case 1: bits |= DR7_LEN_1; break;
default: return 0; default: return FALSE;
} }
*val = reg; *val = reg;
/* clear old values */ /* clear old values */
...@@ -679,12 +679,12 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i ...@@ -679,12 +679,12 @@ static unsigned be_i386_insert_Xpoint(HANDLE hProcess, const struct be_process_i
break; break;
default: default:
dbg_printf("Unknown bp type %c\n", type); dbg_printf("Unknown bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long val, unsigned size) void* addr, unsigned long val, unsigned size)
{ {
...@@ -694,13 +694,13 @@ static unsigned be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_i ...@@ -694,13 +694,13 @@ static unsigned be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_i
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (size != 0) return 0; if (size != 0) return FALSE;
if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
if (ch != (unsigned char)0xCC) if (ch != (unsigned char)0xCC)
WINE_FIXME("Cannot get back %02x instead of 0xCC at %08lx\n", WINE_FIXME("Cannot get back %02x instead of 0xCC at %08lx\n",
ch, (unsigned long)addr); ch, (unsigned long)addr);
ch = (unsigned char)val; ch = (unsigned char)val;
if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
break; break;
case be_xpoint_watch_exec: case be_xpoint_watch_exec:
case be_xpoint_watch_read: case be_xpoint_watch_read:
...@@ -710,12 +710,12 @@ static unsigned be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_i ...@@ -710,12 +710,12 @@ static unsigned be_i386_remove_Xpoint(HANDLE hProcess, const struct be_process_i
break; break;
default: default:
dbg_printf("Unknown bp type %c\n", type); dbg_printf("Unknown bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_i386_is_watchpoint_set(const CONTEXT* ctx, unsigned idx) static BOOL be_i386_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
{ {
return ctx->Dr6 & (1 << idx); return ctx->Dr6 & (1 << idx);
} }
...@@ -736,8 +736,8 @@ static int be_i386_adjust_pc_for_break(CONTEXT* ctx, BOOL way) ...@@ -736,8 +736,8 @@ static int be_i386_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
return 1; return 1;
} }
static int be_i386_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_i386_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG* ret) BOOL is_signed, LONGLONG* ret)
{ {
if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE; if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE;
...@@ -756,7 +756,7 @@ static int be_i386_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, ...@@ -756,7 +756,7 @@ static int be_i386_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
return TRUE; return TRUE;
} }
static int be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
long double* ret) long double* ret)
{ {
char tmp[sizeof(long double)]; char tmp[sizeof(long double)];
...@@ -775,8 +775,8 @@ static int be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, ...@@ -775,8 +775,8 @@ static int be_i386_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
return TRUE; return TRUE;
} }
static int be_i386_store_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_i386_store_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG val) BOOL is_signed, LONGLONG val)
{ {
/* this is simple as we're on a little endian CPU */ /* this is simple as we're on a little endian CPU */
return memory_write_value(lvalue, size, &val); return memory_write_value(lvalue, size, &val);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#if defined(__powerpc__) #if defined(__powerpc__)
static unsigned be_ppc_get_addr(HANDLE hThread, const CONTEXT* ctx, static BOOL be_ppc_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum be_cpu_addr bca, ADDRESS64* addr) enum be_cpu_addr bca, ADDRESS64* addr)
{ {
switch (bca) switch (bca)
...@@ -38,7 +38,7 @@ static unsigned be_ppc_get_addr(HANDLE hThread, const CONTEXT* ctx, ...@@ -38,7 +38,7 @@ static unsigned be_ppc_get_addr(HANDLE hThread, const CONTEXT* ctx,
return FALSE; return FALSE;
} }
static unsigned be_ppc_get_register_info(int regno, enum be_cpu_addr* kind) static BOOL be_ppc_get_register_info(int regno, enum be_cpu_addr* kind)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
...@@ -67,30 +67,30 @@ static struct dbg_internal_var be_ppc_ctx[] = ...@@ -67,30 +67,30 @@ static struct dbg_internal_var be_ppc_ctx[] =
{0, NULL, 0, dbg_itype_none} {0, NULL, 0, dbg_itype_none}
}; };
static unsigned be_ppc_is_step_over_insn(const void* insn) static BOOL be_ppc_is_step_over_insn(const void* insn)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
} }
static unsigned be_ppc_is_function_return(const void* insn) static BOOL be_ppc_is_function_return(const void* insn)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
} }
static unsigned be_ppc_is_break_insn(const void* insn) static BOOL be_ppc_is_break_insn(const void* insn)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
} }
static unsigned be_ppc_is_func_call(const void* insn, ADDRESS64* callee) static BOOL be_ppc_is_func_call(const void* insn, ADDRESS64* callee)
{ {
return FALSE; return FALSE;
} }
static unsigned be_ppc_is_jump(const void* insn, ADDRESS64* jumpee) static BOOL be_ppc_is_jump(const void* insn, ADDRESS64* jumpee)
{ {
return FALSE; return FALSE;
} }
...@@ -101,7 +101,7 @@ static void be_ppc_disasm_one_insn(ADDRESS64* addr, int display) ...@@ -101,7 +101,7 @@ static void be_ppc_disasm_one_insn(ADDRESS64* addr, int display)
dbg_printf("Disasm NIY\n"); dbg_printf("Disasm NIY\n");
} }
static unsigned be_ppc_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_ppc_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long* val, unsigned size) void* addr, unsigned long* val, unsigned size)
{ {
...@@ -111,19 +111,19 @@ static unsigned be_ppc_insert_Xpoint(HANDLE hProcess, const struct be_process_io ...@@ -111,19 +111,19 @@ static unsigned be_ppc_insert_Xpoint(HANDLE hProcess, const struct be_process_io
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (!size) return 0; if (!size) return FALSE;
if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return 0; if (!pio->read(hProcess, addr, val, 4, &sz) || sz != 4) return FALSE;
xbp = 0x7d821008; /* 7d 82 10 08 ... in big endian */ xbp = 0x7d821008; /* 7d 82 10 08 ... in big endian */
if (!pio->write(hProcess, addr, &xbp, 4, &sz) || sz != 4) return 0; if (!pio->write(hProcess, addr, &xbp, 4, &sz) || sz != 4) return FALSE;
break; break;
default: default:
dbg_printf("Unknown/unsupported bp type %c\n", type); dbg_printf("Unknown/unsupported bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_ppc_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_ppc_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long val, unsigned size) void* addr, unsigned long val, unsigned size)
{ {
...@@ -132,17 +132,17 @@ static unsigned be_ppc_remove_Xpoint(HANDLE hProcess, const struct be_process_io ...@@ -132,17 +132,17 @@ static unsigned be_ppc_remove_Xpoint(HANDLE hProcess, const struct be_process_io
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (!size) return 0; if (!size) return FALSE;
if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return 0; if (!pio->write(hProcess, addr, &val, 4, &sz) || sz == 4) return FALSE;
break; break;
default: default:
dbg_printf("Unknown/unsupported bp type %c\n", type); dbg_printf("Unknown/unsupported bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_ppc_is_watchpoint_set(const CONTEXT* ctx, unsigned idx) static BOOL be_ppc_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
...@@ -159,22 +159,22 @@ static int be_ppc_adjust_pc_for_break(CONTEXT* ctx, BOOL way) ...@@ -159,22 +159,22 @@ static int be_ppc_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
return 0; return 0;
} }
static int be_ppc_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_ppc_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG* ret) BOOL is_signed, LONGLONG* ret)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
} }
static int be_ppc_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_ppc_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
long double* ret) long double* ret)
{ {
dbg_printf("not done\n"); dbg_printf("not done\n");
return FALSE; return FALSE;
} }
static int be_ppc_store_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_ppc_store_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG val) BOOL is_signed, LONGLONG val)
{ {
dbg_printf("be_ppc_store_integer: not done\n"); dbg_printf("be_ppc_store_integer: not done\n");
return FALSE; return FALSE;
......
...@@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winedbg); ...@@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
#define STEP_FLAG 0x00000100 /* single step flag */ #define STEP_FLAG 0x00000100 /* single step flag */
static unsigned be_x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx, static BOOL be_x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum be_cpu_addr bca, ADDRESS64* addr) enum be_cpu_addr bca, ADDRESS64* addr)
{ {
addr->Mode = AddrModeFlat; addr->Mode = AddrModeFlat;
...@@ -52,7 +52,7 @@ static unsigned be_x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx, ...@@ -52,7 +52,7 @@ static unsigned be_x86_64_get_addr(HANDLE hThread, const CONTEXT* ctx,
} }
} }
static unsigned be_x86_64_get_register_info(int regno, enum be_cpu_addr* kind) static BOOL be_x86_64_get_register_info(int regno, enum be_cpu_addr* kind)
{ {
/* this is true when running in 32bit mode... and wrong in 64 :-/ */ /* this is true when running in 32bit mode... and wrong in 64 :-/ */
switch (regno) switch (regno)
...@@ -242,7 +242,7 @@ static struct dbg_internal_var be_x86_64_ctx[] = ...@@ -242,7 +242,7 @@ static struct dbg_internal_var be_x86_64_ctx[] =
#define f_reg(b) (((b)>>3)&0x7) #define f_reg(b) (((b)>>3)&0x7)
#define f_rm(b) ((b)&0x7) #define f_rm(b) ((b)&0x7)
static unsigned be_x86_64_is_step_over_insn(const void* insn) static BOOL be_x86_64_is_step_over_insn(const void* insn)
{ {
BYTE ch; BYTE ch;
...@@ -301,7 +301,7 @@ static unsigned be_x86_64_is_step_over_insn(const void* insn) ...@@ -301,7 +301,7 @@ static unsigned be_x86_64_is_step_over_insn(const void* insn)
} }
} }
static unsigned be_x86_64_is_function_return(const void* insn) static BOOL be_x86_64_is_function_return(const void* insn)
{ {
BYTE c; BYTE c;
...@@ -315,7 +315,7 @@ static unsigned be_x86_64_is_function_return(const void* insn) ...@@ -315,7 +315,7 @@ static unsigned be_x86_64_is_function_return(const void* insn)
return c == 0xC2 /* ret */ || c == 0xC3 /* ret NN */; return c == 0xC2 /* ret */ || c == 0xC3 /* ret NN */;
} }
static unsigned be_x86_64_is_break_insn(const void* insn) static BOOL be_x86_64_is_break_insn(const void* insn)
{ {
BYTE c; BYTE c;
return dbg_read_memory(insn, &c, sizeof(c)) && c == 0xCC; return dbg_read_memory(insn, &c, sizeof(c)) && c == 0xCC;
...@@ -343,7 +343,7 @@ static BOOL fetch_value(const char* addr, unsigned sz, int* value) ...@@ -343,7 +343,7 @@ static BOOL fetch_value(const char* addr, unsigned sz, int* value)
return TRUE; return TRUE;
} }
static unsigned be_x86_64_is_func_call(const void* insn, ADDRESS64* callee) static BOOL be_x86_64_is_func_call(const void* insn, ADDRESS64* callee)
{ {
BYTE ch; BYTE ch;
LONG delta; LONG delta;
...@@ -436,7 +436,7 @@ static unsigned be_x86_64_is_func_call(const void* insn, ADDRESS64* callee) ...@@ -436,7 +436,7 @@ static unsigned be_x86_64_is_func_call(const void* insn, ADDRESS64* callee)
} }
} }
static unsigned be_x86_64_is_jump(const void* insn, ADDRESS64* jumpee) static BOOL be_x86_64_is_jump(const void* insn, ADDRESS64* jumpee)
{ {
return FALSE; return FALSE;
} }
...@@ -496,7 +496,7 @@ static inline int be_x86_64_get_unused_DR(CONTEXT* ctx, DWORD64** r) ...@@ -496,7 +496,7 @@ static inline int be_x86_64_get_unused_DR(CONTEXT* ctx, DWORD64** r)
return -1; return -1;
} }
static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long* val, unsigned size) void* addr, unsigned long* val, unsigned size)
{ {
...@@ -509,11 +509,11 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process ...@@ -509,11 +509,11 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (size != 0) return 0; if (size != 0) return FALSE;
if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
*val = ch; *val = ch;
ch = 0xcc; ch = 0xcc;
if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
break; break;
case be_xpoint_watch_exec: case be_xpoint_watch_exec:
bits = DR7_RW_EXECUTE; bits = DR7_RW_EXECUTE;
...@@ -524,7 +524,7 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process ...@@ -524,7 +524,7 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
case be_xpoint_watch_write: case be_xpoint_watch_write:
bits = DR7_RW_WRITE; bits = DR7_RW_WRITE;
hw_bp: hw_bp:
if ((reg = be_x86_64_get_unused_DR(ctx, &pr)) == -1) return 0; if ((reg = be_x86_64_get_unused_DR(ctx, &pr)) == -1) return FALSE;
*pr = (DWORD64)addr; *pr = (DWORD64)addr;
if (type != be_xpoint_watch_exec) switch (size) if (type != be_xpoint_watch_exec) switch (size)
{ {
...@@ -532,7 +532,7 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process ...@@ -532,7 +532,7 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
case 4: bits |= DR7_LEN_4; break; case 4: bits |= DR7_LEN_4; break;
case 2: bits |= DR7_LEN_2; break; case 2: bits |= DR7_LEN_2; break;
case 1: bits |= DR7_LEN_1; break; case 1: bits |= DR7_LEN_1; break;
default: WINE_FIXME("Unsupported xpoint_watch of size %d\n", size); return 0; default: WINE_FIXME("Unsupported xpoint_watch of size %d\n", size); return FALSE;
} }
*val = reg; *val = reg;
/* clear old values */ /* clear old values */
...@@ -543,12 +543,12 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process ...@@ -543,12 +543,12 @@ static unsigned be_x86_64_insert_Xpoint(HANDLE hProcess, const struct be_process
break; break;
default: default:
dbg_printf("Unknown bp type %c\n", type); dbg_printf("Unknown bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio, static BOOL be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process_io* pio,
CONTEXT* ctx, enum be_xpoint_type type, CONTEXT* ctx, enum be_xpoint_type type,
void* addr, unsigned long val, unsigned size) void* addr, unsigned long val, unsigned size)
{ {
...@@ -558,12 +558,12 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process ...@@ -558,12 +558,12 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process
switch (type) switch (type)
{ {
case be_xpoint_break: case be_xpoint_break:
if (size != 0) return 0; if (size != 0) return FALSE;
if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->read(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
if (ch != (unsigned char)0xCC) if (ch != (unsigned char)0xCC)
WINE_FIXME("Cannot get back %02x instead of 0xCC at %p\n", ch, addr); WINE_FIXME("Cannot get back %02x instead of 0xCC at %p\n", ch, addr);
ch = (unsigned char)val; ch = (unsigned char)val;
if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return 0; if (!pio->write(hProcess, addr, &ch, 1, &sz) || sz != 1) return FALSE;
break; break;
case be_xpoint_watch_exec: case be_xpoint_watch_exec:
case be_xpoint_watch_read: case be_xpoint_watch_read:
...@@ -573,12 +573,12 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process ...@@ -573,12 +573,12 @@ static unsigned be_x86_64_remove_Xpoint(HANDLE hProcess, const struct be_process
break; break;
default: default:
dbg_printf("Unknown bp type %c\n", type); dbg_printf("Unknown bp type %c\n", type);
return 0; return FALSE;
} }
return 1; return TRUE;
} }
static unsigned be_x86_64_is_watchpoint_set(const CONTEXT* ctx, unsigned idx) static BOOL be_x86_64_is_watchpoint_set(const CONTEXT* ctx, unsigned idx)
{ {
return ctx->Dr6 & (1 << idx); return ctx->Dr6 & (1 << idx);
} }
...@@ -599,8 +599,8 @@ static int be_x86_64_adjust_pc_for_break(CONTEXT* ctx, BOOL way) ...@@ -599,8 +599,8 @@ static int be_x86_64_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
return 1; return 1;
} }
static int be_x86_64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_x86_64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG* ret) BOOL is_signed, LONGLONG* ret)
{ {
if (size != 1 && size != 2 && size != 4 && size != 8 && size != 16) if (size != 1 && size != 2 && size != 4 && size != 8 && size != 16)
return FALSE; return FALSE;
...@@ -620,7 +620,7 @@ static int be_x86_64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned siz ...@@ -620,7 +620,7 @@ static int be_x86_64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned siz
return TRUE; return TRUE;
} }
static int be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
long double* ret) long double* ret)
{ {
char tmp[sizeof(long double)]; char tmp[sizeof(long double)];
...@@ -639,8 +639,8 @@ static int be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size, ...@@ -639,8 +639,8 @@ static int be_x86_64_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
return TRUE; return TRUE;
} }
static int be_x86_64_store_integer(const struct dbg_lvalue* lvalue, unsigned size, static BOOL be_x86_64_store_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned is_signed, LONGLONG val) BOOL is_signed, LONGLONG val)
{ {
/* this is simple as we're on a little endian CPU */ /* this is simple as we're on a little endian CPU */
return memory_write_value(lvalue, size, &val); return memory_write_value(lvalue, size, &val);
......
...@@ -39,7 +39,7 @@ void* be_cpu_linearize(HANDLE hThread, const ADDRESS64* addr) ...@@ -39,7 +39,7 @@ void* be_cpu_linearize(HANDLE hThread, const ADDRESS64* addr)
return (void*)(DWORD_PTR)addr->Offset; return (void*)(DWORD_PTR)addr->Offset;
} }
unsigned be_cpu_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr, BOOL be_cpu_build_addr(HANDLE hThread, const CONTEXT* ctx, ADDRESS64* addr,
unsigned seg, unsigned long offset) unsigned seg, unsigned long offset)
{ {
addr->Mode = AddrModeFlat; addr->Mode = AddrModeFlat;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment