mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-18 12:18:05 +00:00
winedbg: Use BOOL type where appropriate.
This commit is contained in:
parent
5dfe1b0cfe
commit
fe580c083d
|
@ -1684,7 +1684,7 @@ static unsigned be_arm_get_register_info(int regno, enum be_cpu_addr* kind)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void be_arm_single_step(CONTEXT* ctx, unsigned enable)
|
static void be_arm_single_step(CONTEXT* ctx, BOOL enable)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ static unsigned be_arm64_get_register_info(int regno, enum be_cpu_addr* kind)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void be_arm64_single_step(CONTEXT* ctx, unsigned enable)
|
static void be_arm64_single_step(CONTEXT* ctx, BOOL enable)
|
||||||
{
|
{
|
||||||
dbg_printf("be_arm64_single_step: not done\n");
|
dbg_printf("be_arm64_single_step: not done\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct backend_cpu
|
||||||
* context manipulation
|
* context manipulation
|
||||||
* ------------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------------- */
|
||||||
/* Enables/disables CPU single step mode (depending on enable) */
|
/* Enables/disables CPU single step mode (depending on enable) */
|
||||||
void (*single_step)(CONTEXT* ctx, unsigned enable);
|
void (*single_step)(CONTEXT* ctx, BOOL enable);
|
||||||
/* Dumps out the content of the context */
|
/* Dumps out the content of the context */
|
||||||
void (*print_context)(HANDLE hThread, const CONTEXT* ctx, int all_regs);
|
void (*print_context)(HANDLE hThread, const CONTEXT* ctx, int all_regs);
|
||||||
/* Prints information about segments. Non segmented CPU should leave this
|
/* Prints information about segments. Non segmented CPU should leave this
|
||||||
|
|
|
@ -121,7 +121,7 @@ static unsigned be_i386_get_register_info(int regno, enum be_cpu_addr* kind)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void be_i386_single_step(CONTEXT* ctx, unsigned enable)
|
static void be_i386_single_step(CONTEXT* ctx, BOOL enable)
|
||||||
{
|
{
|
||||||
if (enable) ctx->EFlags |= STEP_FLAG;
|
if (enable) ctx->EFlags |= STEP_FLAG;
|
||||||
else ctx->EFlags &= ~STEP_FLAG;
|
else ctx->EFlags &= ~STEP_FLAG;
|
||||||
|
|
|
@ -44,7 +44,7 @@ static unsigned be_ppc_get_register_info(int regno, enum be_cpu_addr* kind)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void be_ppc_single_step(CONTEXT* ctx, unsigned enable)
|
static void be_ppc_single_step(CONTEXT* ctx, BOOL enable)
|
||||||
{
|
{
|
||||||
#ifndef MSR_SE
|
#ifndef MSR_SE
|
||||||
# define MSR_SE (1<<10)
|
# define MSR_SE (1<<10)
|
||||||
|
|
|
@ -64,7 +64,7 @@ static unsigned be_x86_64_get_register_info(int regno, enum be_cpu_addr* kind)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void be_x86_64_single_step(CONTEXT* ctx, unsigned enable)
|
static void be_x86_64_single_step(CONTEXT* ctx, BOOL enable)
|
||||||
{
|
{
|
||||||
if (enable) ctx->EFlags |= STEP_FLAG;
|
if (enable) ctx->EFlags |= STEP_FLAG;
|
||||||
else ctx->EFlags &= ~STEP_FLAG;
|
else ctx->EFlags &= ~STEP_FLAG;
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
|
WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
|
||||||
|
|
||||||
static int is_xpoint_break(int bpnum)
|
static BOOL is_xpoint_break(int bpnum)
|
||||||
{
|
{
|
||||||
int type = dbg_curr_process->bp[bpnum].xpoint_type;
|
int type = dbg_curr_process->bp[bpnum].xpoint_type;
|
||||||
|
|
||||||
if (type == be_xpoint_break || type == be_xpoint_watch_exec) return TRUE;
|
if (type == be_xpoint_break || type == be_xpoint_watch_exec) return TRUE;
|
||||||
if (type == be_xpoint_watch_read || type == be_xpoint_watch_write) return FALSE;
|
if (type == be_xpoint_watch_read || type == be_xpoint_watch_write) return FALSE;
|
||||||
RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
|
RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
|
||||||
return 0; /* never reached */
|
return FALSE; /* never reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1001,7 +1001,7 @@ void break_restart_execution(int count)
|
||||||
dbg_curr_thread->exec_mode = ret_mode;
|
dbg_curr_thread->exec_mode = ret_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int break_add_condition(int num, struct expr* exp)
|
BOOL break_add_condition(int num, struct expr* exp)
|
||||||
{
|
{
|
||||||
if (num <= 0 || num >= dbg_curr_process->next_bp ||
|
if (num <= 0 || num >= dbg_curr_process->next_bp ||
|
||||||
!dbg_curr_process->bp[num].refcount)
|
!dbg_curr_process->bp[num].refcount)
|
||||||
|
|
|
@ -227,7 +227,7 @@ struct dbg_process
|
||||||
void* pio_data;
|
void* pio_data;
|
||||||
const WCHAR* imageName;
|
const WCHAR* imageName;
|
||||||
struct list threads;
|
struct list threads;
|
||||||
unsigned continue_on_first_exception : 1,
|
BOOL continue_on_first_exception : 1,
|
||||||
active_debuggee : 1;
|
active_debuggee : 1;
|
||||||
struct dbg_breakpoint bp[MAX_BREAKPOINTS];
|
struct dbg_breakpoint bp[MAX_BREAKPOINTS];
|
||||||
unsigned next_bp;
|
unsigned next_bp;
|
||||||
|
@ -324,11 +324,11 @@ extern void lexeme_flush(void);
|
||||||
extern char* lexeme_alloc_size(int);
|
extern char* lexeme_alloc_size(int);
|
||||||
|
|
||||||
/* display.c */
|
/* display.c */
|
||||||
extern int display_print(void);
|
extern BOOL display_print(void);
|
||||||
extern int display_add(struct expr* exp, int count, char format);
|
extern BOOL display_add(struct expr* exp, int count, char format);
|
||||||
extern int display_delete(int displaynum);
|
extern BOOL display_delete(int displaynum);
|
||||||
extern int display_info(void);
|
extern BOOL display_info(void);
|
||||||
extern int display_enable(int displaynum, int enable);
|
extern BOOL display_enable(int displaynum, int enable);
|
||||||
|
|
||||||
/* expr.c */
|
/* expr.c */
|
||||||
extern void expr_free_all(void);
|
extern void expr_free_all(void);
|
||||||
|
@ -345,8 +345,8 @@ extern struct expr* expr_alloc_func_call(const char*, int nargs, ...);
|
||||||
extern struct expr* expr_alloc_typecast(struct type_expr_t*, struct expr*);
|
extern struct expr* expr_alloc_typecast(struct type_expr_t*, struct expr*);
|
||||||
extern struct dbg_lvalue expr_eval(struct expr*);
|
extern struct dbg_lvalue expr_eval(struct expr*);
|
||||||
extern struct expr* expr_clone(const struct expr* exp, BOOL *local_binding);
|
extern struct expr* expr_clone(const struct expr* exp, BOOL *local_binding);
|
||||||
extern int expr_free(struct expr* exp);
|
extern BOOL expr_free(struct expr* exp);
|
||||||
extern int expr_print(const struct expr* exp);
|
extern BOOL expr_print(const struct expr* exp);
|
||||||
|
|
||||||
/* info.c */
|
/* info.c */
|
||||||
extern void print_help(void);
|
extern void print_help(void);
|
||||||
|
@ -404,7 +404,7 @@ extern enum dbg_line_status symbol_get_function_line_status(const ADDRESS64* add
|
||||||
extern BOOL symbol_get_line(const char* filename, const char* func, IMAGEHLP_LINE64* ret);
|
extern BOOL symbol_get_line(const char* filename, const char* func, IMAGEHLP_LINE64* ret);
|
||||||
extern void symbol_info(const char* str);
|
extern void symbol_info(const char* str);
|
||||||
extern void symbol_print_local(const SYMBOL_INFO* sym, DWORD_PTR base, BOOL detailed);
|
extern void symbol_print_local(const SYMBOL_INFO* sym, DWORD_PTR base, BOOL detailed);
|
||||||
extern int symbol_info_locals(void);
|
extern BOOL symbol_info_locals(void);
|
||||||
extern BOOL symbol_is_local(const char* name);
|
extern BOOL symbol_is_local(const char* name);
|
||||||
struct sgv_data;
|
struct sgv_data;
|
||||||
typedef enum sym_get_lval (*symbol_picker_t)(const char* name, const struct sgv_data* sgv,
|
typedef enum sym_get_lval (*symbol_picker_t)(const char* name, const struct sgv_data* sgv,
|
||||||
|
@ -434,8 +434,8 @@ extern enum dbg_start tgt_module_load(const char* name, BOOL keep);
|
||||||
|
|
||||||
/* types.c */
|
/* types.c */
|
||||||
extern void print_value(const struct dbg_lvalue* addr, char format, int level);
|
extern void print_value(const struct dbg_lvalue* addr, char format, int level);
|
||||||
extern int types_print_type(const struct dbg_type*, BOOL details);
|
extern BOOL types_print_type(const struct dbg_type*, BOOL details);
|
||||||
extern int print_types(void);
|
extern BOOL print_types(void);
|
||||||
extern long int types_extract_as_integer(const struct dbg_lvalue*);
|
extern long int types_extract_as_integer(const struct dbg_lvalue*);
|
||||||
extern LONGLONG types_extract_as_longlong(const struct dbg_lvalue*, unsigned* psize, BOOL *pissigned);
|
extern LONGLONG types_extract_as_longlong(const struct dbg_lvalue*, unsigned* psize, BOOL *pissigned);
|
||||||
extern void types_extract_as_address(const struct dbg_lvalue*, ADDRESS64*);
|
extern void types_extract_as_address(const struct dbg_lvalue*, ADDRESS64*);
|
||||||
|
|
|
@ -52,7 +52,7 @@ static inline BOOL cmp_symbol(const SYMBOL_INFO* si1, const SYMBOL_INFO* si2)
|
||||||
!memcmp(si1->Name, si2->Name, si1->NameLen);
|
!memcmp(si1->Name, si2->Name, si1->NameLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
int display_add(struct expr *exp, int count, char format)
|
BOOL display_add(struct expr *exp, int count, char format)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
BOOL local_binding = FALSE;
|
BOOL local_binding = FALSE;
|
||||||
|
@ -94,7 +94,7 @@ int display_add(struct expr *exp, int count, char format)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int display_info(void)
|
BOOL display_info(void)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char buffer[sizeof(SYMBOL_INFO) + 256];
|
char buffer[sizeof(SYMBOL_INFO) + 256];
|
||||||
|
@ -159,7 +159,7 @@ static void print_one_display(int i)
|
||||||
print_value(&lvalue, displaypoints[i].format, 0);
|
print_value(&lvalue, displaypoints[i].format, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int display_print(void)
|
BOOL display_print(void)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char buffer[sizeof(SYMBOL_INFO) + 256];
|
char buffer[sizeof(SYMBOL_INFO) + 256];
|
||||||
|
@ -183,7 +183,7 @@ int display_print(void)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int display_delete(int displaynum)
|
BOOL display_delete(int displaynum)
|
||||||
{
|
{
|
||||||
if (displaynum > ndisplays || displaynum == 0 || displaynum < -1 ||
|
if (displaynum > ndisplays || displaynum == 0 || displaynum < -1 ||
|
||||||
displaypoints[displaynum - 1].exp == NULL)
|
displaypoints[displaynum - 1].exp == NULL)
|
||||||
|
@ -229,7 +229,7 @@ int display_delete(int displaynum)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int display_enable(int displaynum, int enable)
|
BOOL display_enable(int displaynum, int enable)
|
||||||
{
|
{
|
||||||
char buffer[sizeof(SYMBOL_INFO) + 256];
|
char buffer[sizeof(SYMBOL_INFO) + 256];
|
||||||
SYMBOL_INFO* func;
|
SYMBOL_INFO* func;
|
||||||
|
|
|
@ -654,7 +654,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
|
||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
int expr_print(const struct expr* exp)
|
BOOL expr_print(const struct expr* exp)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct dbg_type type;
|
struct dbg_type type;
|
||||||
|
@ -832,7 +832,7 @@ struct expr* expr_clone(const struct expr* exp, BOOL *local_binding)
|
||||||
* Recursively go through an expression tree and free all memory associated
|
* Recursively go through an expression tree and free all memory associated
|
||||||
* with it.
|
* with it.
|
||||||
*/
|
*/
|
||||||
int expr_free(struct expr* exp)
|
BOOL expr_free(struct expr* exp)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -750,7 +750,7 @@ static BOOL CALLBACK info_locals_cb(PSYMBOL_INFO sym, ULONG size, PVOID ctx)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int symbol_info_locals(void)
|
BOOL symbol_info_locals(void)
|
||||||
{
|
{
|
||||||
IMAGEHLP_STACK_FRAME ihsf;
|
IMAGEHLP_STACK_FRAME ihsf;
|
||||||
ADDRESS64 addr;
|
ADDRESS64 addr;
|
||||||
|
|
|
@ -118,7 +118,7 @@ static unsigned dbg_fetch_context(void)
|
||||||
* or exception is silently continued(return FALSE)
|
* or exception is silently continued(return FALSE)
|
||||||
* is_debug means the exception is a breakpoint or single step exception
|
* is_debug means the exception is a breakpoint or single step exception
|
||||||
*/
|
*/
|
||||||
static unsigned dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec)
|
static BOOL dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec)
|
||||||
{
|
{
|
||||||
ADDRESS64 addr;
|
ADDRESS64 addr;
|
||||||
BOOL is_break;
|
BOOL is_break;
|
||||||
|
@ -587,7 +587,7 @@ void dbg_active_wait_for_first_exception(void)
|
||||||
wait_exception();
|
wait_exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned dbg_start_debuggee(LPSTR cmdLine)
|
static BOOL dbg_start_debuggee(LPSTR cmdLine)
|
||||||
{
|
{
|
||||||
PROCESS_INFORMATION info;
|
PROCESS_INFORMATION info;
|
||||||
STARTUPINFOA startup, current;
|
STARTUPINFOA startup, current;
|
||||||
|
|
|
@ -581,18 +581,18 @@ static BOOL CALLBACK print_types_mod_cb(PCSTR mod_name, DWORD64 base, PVOID ctx)
|
||||||
return SymEnumTypes(dbg_curr_process->handle, base, print_types_cb, ctx);
|
return SymEnumTypes(dbg_curr_process->handle, base, print_types_cb, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
int print_types(void)
|
BOOL print_types(void)
|
||||||
{
|
{
|
||||||
if (!dbg_curr_process)
|
if (!dbg_curr_process)
|
||||||
{
|
{
|
||||||
dbg_printf("No known process, cannot print types\n");
|
dbg_printf("No known process, cannot print types\n");
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
SymEnumerateModules64(dbg_curr_process->handle, print_types_mod_cb, NULL);
|
SymEnumerateModules64(dbg_curr_process->handle, print_types_mod_cb, NULL);
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int types_print_type(const struct dbg_type* type, BOOL details)
|
BOOL types_print_type(const struct dbg_type* type, BOOL details)
|
||||||
{
|
{
|
||||||
WCHAR* ptr;
|
WCHAR* ptr;
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
|
|
Loading…
Reference in a new issue