fix: remove windows debugger compilation warnings (#6140)
This commit is contained in:
parent
c79a077d1c
commit
e184f35992
5 changed files with 13 additions and 21 deletions
|
|
@ -208,12 +208,6 @@ int rz_test_main(int argc, const char **argv) {
|
|||
|
||||
eprintf("Running rz-test on %s\n", RZ_TEST_ARCH_OS);
|
||||
|
||||
if (!except_dir) {
|
||||
RZ_LOG_ERROR("Fail to create RzPVector\n");
|
||||
ret = -1;
|
||||
goto beach;
|
||||
}
|
||||
|
||||
#if __WINDOWS__
|
||||
UINT old_cp = GetConsoleOutputCP();
|
||||
{
|
||||
|
|
@ -228,6 +222,12 @@ int rz_test_main(int argc, const char **argv) {
|
|||
}
|
||||
#endif
|
||||
|
||||
if (!except_dir) {
|
||||
RZ_LOG_ERROR("Fail to create RzPVector\n");
|
||||
ret = -1;
|
||||
goto beach;
|
||||
}
|
||||
|
||||
RzGetopt opt;
|
||||
rz_getopt_init(&opt, argc, (const char **)argv, "hqvj:r:m:f:C:LnVNt:F:io:e:s:x:y");
|
||||
|
||||
|
|
|
|||
|
|
@ -1483,17 +1483,6 @@ RZ_API RzFlagItem *rz_core_flag_get_by_spaces(RzFlag *f, ut64 off) {
|
|||
NULL);
|
||||
}
|
||||
|
||||
#if __WINDOWS__
|
||||
// XXX move to rcons?
|
||||
static int win_eprintf(const char *format, ...) {
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
rz_cons_win_vhprintf(STD_ERROR_HANDLE, false, format, ap);
|
||||
va_end(ap);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool bp_is_mapped(ut64 addr, int perm, void *user) {
|
||||
RzCore *core = user;
|
||||
if (rz_core_is_debug(core)) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2015 pancake <pancake@nopcode.org>
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
static RzList /*<RzDebugFrame *>*/ *backtrace_x86_64(RzDebug *dbg, ut64 at) {
|
||||
int i;
|
||||
ut8 buf[8];
|
||||
|
|
@ -54,6 +55,8 @@ static RzList /*<RzDebugFrame *>*/ *backtrace_x86_64(RzDebug *dbg, ut64 at) {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
#endif
|
||||
|
||||
// XXX: Do this work correctly?
|
||||
static RzList /*<RzDebugFrame *>*/ *backtrace_x86_64_analysis(RzDebug *dbg, ut64 at) {
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
/* implementation */
|
||||
#include <rz_debug.h>
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
static RzList /*<RzDebugFrame *>*/ *backtrace_x86_32(RzDebug *dbg, ut64 at) {
|
||||
RzRegItem *ri;
|
||||
RzReg *reg = dbg->reg;
|
||||
|
|
@ -40,6 +41,7 @@ static RzList /*<RzDebugFrame *>*/ *backtrace_x86_32(RzDebug *dbg, ut64 at) {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* TODO: Can I use this as in a coroutine? */
|
||||
static RzList /*<RzDebugFrame *>*/ *backtrace_x86_32_analysis(RzDebug *dbg, ut64 at) {
|
||||
|
|
|
|||
|
|
@ -422,7 +422,6 @@ static DWORD get_msg_type(char *name) {
|
|||
if (!msg_types) {
|
||||
init_msg_types(&msg_types);
|
||||
}
|
||||
ut32 found;
|
||||
const char *type_str = sdb_const_get(msg_types, name);
|
||||
if (type_str) {
|
||||
int type = rz_num_get(NULL, type_str);
|
||||
|
|
@ -501,7 +500,6 @@ RZ_API bool rz_w32_add_winmsg_breakpoint(RzDebug *dbg, const char *msg_name, con
|
|||
free(name);
|
||||
return false;
|
||||
}
|
||||
char *cond;
|
||||
if (window_id) {
|
||||
char *reg;
|
||||
if (!strcmp(dbg->arch, "arm")) {
|
||||
|
|
@ -513,7 +511,7 @@ RZ_API bool rz_w32_add_winmsg_breakpoint(RzDebug *dbg, const char *msg_name, con
|
|||
} else {
|
||||
reg = "edx";
|
||||
}
|
||||
b->cond = rz_str_newf("%= `ae %s,%d,-`", reg, type);
|
||||
b->cond = rz_str_newf("%%= `ae %s,%" PFMT32u ",-`", reg, type);
|
||||
} else {
|
||||
char *reg;
|
||||
if (!strcmp(dbg->arch, "arm")) {
|
||||
|
|
@ -529,7 +527,7 @@ RZ_API bool rz_w32_add_winmsg_breakpoint(RzDebug *dbg, const char *msg_name, con
|
|||
reg = "ecx";
|
||||
}
|
||||
}
|
||||
b->cond = rz_str_newf("%= `ae %lu,%s,%d,+,[4],-`", type, reg, dbg->bits);
|
||||
b->cond = rz_str_newf("%%= `ae %lu,%s,%d,+,[4],-`", type, reg, dbg->bits);
|
||||
}
|
||||
free(name);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue