Add a linting to avoid R_LOG calls ending with a dot ##lint
This commit is contained in:
parent
7c0db9aa5a
commit
e2bbe2b14e
|
@ -428,7 +428,7 @@ static bool v850np_disassemble(v850np_inst *inst, int cpumodel, ut64 memaddr, co
|
|||
bool invalid = false;
|
||||
value = get_operand_value (operand, insn, buffer + 2, buffer_size - 2, &invalid);
|
||||
if (invalid) {
|
||||
// R_LOG_WARN ("Cannot get operand value.");
|
||||
// R_LOG_WARN ("Cannot get operand value");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ static st32 parse_type(Context *ctx, const ut64 offset, RStrBuf *strbuf, ut64 *s
|
|||
*visited = su;
|
||||
}
|
||||
if (visited && set_u_contains (*visited, offset)) {
|
||||
R_LOG_WARN ("anal.dwarf.parse_type: infinite recursion detected.");
|
||||
R_LOG_WARN ("anal.dwarf.parse_type: infinite recursion detected");
|
||||
return -1;
|
||||
}
|
||||
set_u_add (*visited, offset);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* radare - LGPL - Copyright 2015-2020 - pancake, rkx1209 */
|
||||
/* radare - LGPL - Copyright 2015-2022 - pancake, rkx1209 */
|
||||
|
||||
#include <r_anal.h>
|
||||
|
||||
|
@ -19,7 +19,7 @@ static void htup_vector_free(HtUPKv *kv) {
|
|||
R_API RAnalEsilTrace *r_anal_esil_trace_new(RAnalEsil *esil) {
|
||||
r_return_val_if_fail (esil, NULL);
|
||||
if (!esil->stack_addr || !esil->stack_size) {
|
||||
eprintf ("Run `aeim` to initialize a stack for the ESIL vm\n");
|
||||
R_LOG_ERROR ("Run `aeim` to initialize a stack for the ESIL vm");
|
||||
return NULL;
|
||||
}
|
||||
size_t i;
|
||||
|
@ -88,7 +88,7 @@ static void add_reg_change(RAnalEsilTrace *trace, int idx, RRegItem *ri, ut64 da
|
|||
if (!vreg) {
|
||||
vreg = r_vector_new (sizeof (RAnalEsilRegChange), NULL, NULL);
|
||||
if (!vreg) {
|
||||
R_LOG_ERROR ("creating a register vector.");
|
||||
R_LOG_ERROR ("creating a register vector");
|
||||
return;
|
||||
}
|
||||
ht_up_insert (trace->registers, addr, vreg);
|
||||
|
@ -103,7 +103,7 @@ static void add_mem_change(RAnalEsilTrace *trace, int idx, ut64 addr, ut8 data)
|
|||
if (!vmem) {
|
||||
vmem = r_vector_new (sizeof (RAnalEsilMemChange), NULL, NULL);
|
||||
if (!vmem) {
|
||||
R_LOG_ERROR ("creating a memory vector.");
|
||||
R_LOG_ERROR ("creating a memory vector");
|
||||
return;
|
||||
}
|
||||
ht_up_insert (trace->memory, addr, vmem);
|
||||
|
|
|
@ -667,7 +667,7 @@ static int fcn_recurse(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut64 len, int
|
|||
}
|
||||
if ((maxlen - (addrbytes * idx)) > MAX_SCAN_SIZE) {
|
||||
if (anal->verbose) {
|
||||
R_LOG_WARN ("Skipping large memory region.");
|
||||
R_LOG_WARN ("Skipping large memory region");
|
||||
}
|
||||
maxlen = 0;
|
||||
}
|
||||
|
@ -1690,7 +1690,7 @@ R_API RAnalFunction *r_anal_get_function_byname(RAnal *a, const char *name) {
|
|||
R_API bool r_anal_function_add_bb(RAnal *a, RAnalFunction *fcn, ut64 addr, ut64 size, ut64 jump, ut64 fail, R_BORROW RAnalDiff *diff) {
|
||||
D eprintf ("Add bb\n");
|
||||
if (size == 0) { // empty basic blocks allowed?
|
||||
R_LOG_WARN ("empty basic block at 0x%08"PFMT64x" is not allowed. pending discussion.", addr);
|
||||
R_LOG_WARN ("empty basic block at 0x%08"PFMT64x" is not allowed. pending discussion", addr);
|
||||
r_warn_if_reached ();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ static CPU_MODEL *__get_cpu_model_recursive(const char *model) {
|
|||
if (cpu && cpu->inherit && !cpu->inherit_cpu_p) {
|
||||
cpu->inherit_cpu_p = get_cpu_model (cpu->inherit);
|
||||
if (!cpu->inherit_cpu_p) {
|
||||
R_LOG_ERROR ("Cannot inherit from unknown CPU model '%s'.", cpu->inherit);
|
||||
R_LOG_ERROR ("Cannot inherit from unknown CPU model '%s'", cpu->inherit);
|
||||
}
|
||||
}
|
||||
return cpu;
|
||||
|
@ -209,7 +209,7 @@ static CPU_CONST *const_by_name(CPU_MODEL *cpu, int type, char *c) {
|
|||
if (cpu->inherit_cpu_p) {
|
||||
return const_by_name (cpu->inherit_cpu_p, type, c);
|
||||
}
|
||||
R_LOG_ERROR ("CONSTANT key[%s] NOT FOUND.", c);
|
||||
R_LOG_ERROR ("CONSTANT key[%s] NOT FOUND", c);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ static int java_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int len
|
|||
}
|
||||
IFDBG {
|
||||
R_LOG_DEBUG ("Extracting op from buffer (%d byte(s)) @ 0x%04x", (int)len, (ut32)addr);
|
||||
R_LOG_DEBUG ("Parsing op: (0x%02x) %s.", op_byte, JAVA_OPS[op_byte].name);
|
||||
R_LOG_DEBUG ("Parsing op: (0x%02x) %s", op_byte, JAVA_OPS[op_byte].name);
|
||||
}
|
||||
op->addr = addr;
|
||||
op->size = sz;
|
||||
|
@ -252,7 +252,7 @@ static int java_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int len
|
|||
op->eob = r_anal_java_is_op_type_eop (op->type2);
|
||||
IFDBG {
|
||||
const char *ot_str = r_anal_optype_to_string (op->type);
|
||||
R_LOG_DEBUG ("op_type2: %s @ 0x%04"PFMT64x" 0x%08"PFMT64x" op_type: (0x%02"PFMT64x") %s.",
|
||||
R_LOG_DEBUG ("op_type2: %s @ 0x%04"PFMT64x" 0x%08"PFMT64x" op_type: (0x%02"PFMT64x") %s",
|
||||
JAVA_OPS[op_byte].name, addr, (ut64)op->type2, (ut64)op->type, ot_str);
|
||||
//eprintf ("op_eob: 0x%02x.\n", op->eob);
|
||||
//eprintf ("op_byte @ 0: 0x%02x op_byte @ 0x%04x: 0x%02x.\n", data[0], addr, data[addr]);
|
||||
|
|
|
@ -169,7 +169,7 @@ static RList *rtti_msvc_read_base_class_array(RVTableContext *context, ut32 num_
|
|||
|
||||
if (num_base_classes > BASE_CLASSES_MAX) {
|
||||
if (context->anal->verbose) {
|
||||
R_LOG_WARN ("Length of base class array at 0x%08"PFMT64x" exceeds %d.", addr, BASE_CLASSES_MAX);
|
||||
R_LOG_WARN ("Length of base class array at 0x%08"PFMT64x" exceeds %d", addr, BASE_CLASSES_MAX);
|
||||
}
|
||||
num_base_classes = BASE_CLASSES_MAX;
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ RecoveryCompleteObjectLocator *recovery_anal_complete_object_locator(RRTTIMSVCAn
|
|||
}
|
||||
if (!td->valid) {
|
||||
if (context->vt_context->anal->verbose) {
|
||||
R_LOG_WARN ("type descriptor of base is invalid.");
|
||||
R_LOG_WARN ("type descriptor of base is invalid");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -865,7 +865,7 @@ static void recovery_apply_bases(RRTTIMSVCAnalContext *context, const char *clas
|
|||
const char *base_class_name;
|
||||
if (!base_td->col) {
|
||||
if (context->vt_context->anal->verbose) {
|
||||
R_LOG_WARN ("Base td %s has no col. Falling back to recovery from td only.", base_td->td.name);
|
||||
R_LOG_WARN ("Base td %s has no col. Falling back to recovery from td only", base_td->td.name);
|
||||
}
|
||||
base_class_name = recovery_apply_type_descriptor (context, base_td);
|
||||
} else {
|
||||
|
@ -874,7 +874,7 @@ static void recovery_apply_bases(RRTTIMSVCAnalContext *context, const char *clas
|
|||
|
||||
if (!base_class_name) {
|
||||
if (context->vt_context->anal->verbose) {
|
||||
eprintf ("Failed to convert !base td->col or td to a class\n");
|
||||
R_LOG_WARN ("Failed to convert !base td->col or td to a class");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -941,7 +941,7 @@ static void extract_arg(RAnal *anal, RAnalFunction *fcn, RAnalOp *op, const char
|
|||
const char *rn = op->dst->reg ? op->dst->reg->name : NULL;
|
||||
if (rn && ((bp && !strcmp (bp, rn)) || (sp && !strcmp (sp, rn)))) {
|
||||
if (anal->verbose) {
|
||||
R_LOG_WARN ("Analysis didn't fill op->stackop for instruction that alters stack at 0x%" PFMT64x ".", op->addr);
|
||||
R_LOG_WARN ("Analysis didn't fill op->stackop for instruction that alters stack at 0x%" PFMT64x, op->addr);
|
||||
}
|
||||
goto beach;
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ static void extract_arg(RAnal *anal, RAnalFunction *fcn, RAnalOp *op, const char
|
|||
}
|
||||
|
||||
if (anal->verbose && (!op->src[0] || !op->dst)) {
|
||||
R_LOG_WARN ("Analysis didn't fill op->src/dst at 0x%" PFMT64x ".", op->addr);
|
||||
R_LOG_WARN ("Analysis didn't fill op->src/dst at 0x%" PFMT64x, op->addr);
|
||||
}
|
||||
|
||||
int rw = (op->direction == R_ANAL_OP_DIR_WRITE) ? R_ANAL_VAR_ACCESS_TYPE_WRITE : R_ANAL_VAR_ACCESS_TYPE_READ;
|
||||
|
@ -1741,7 +1741,7 @@ R_API char *r_anal_function_format_sig(R_NONNULL RAnal *anal, R_NONNULL RAnalFun
|
|||
const char *name = r_type_func_args_name (TDB, type_fcn_name, i);
|
||||
if (!type || !*type || !name) {
|
||||
// USE RLOG API
|
||||
R_LOG_WARN ("Missing type for '%s'.", type_fcn_name);
|
||||
R_LOG_WARN ("Missing type for '%s'", type_fcn_name);
|
||||
goto beach;
|
||||
}
|
||||
size_t len = strlen (type);
|
||||
|
|
|
@ -245,7 +245,7 @@ void (store_opN)(struct op_parameter par) {
|
|||
def_op (.op_obj = par.op_obj, .op_name = par.op_name, .op_code = par.op_code, .pop = par.pop, .push = par.push);
|
||||
break;
|
||||
default:
|
||||
R_LOG_ERROR ("Error in store_op in opcode.c, call function %u.", par.func);
|
||||
R_LOG_ERROR ("Error in store_op in opcode.c, call function %u", par.func);
|
||||
return;
|
||||
}
|
||||
par.op_obj[par.op_code].type |= HASSTORE;
|
||||
|
|
|
@ -67,7 +67,7 @@ static inline int r_asm_pseudo_arch(RAsm *a, const char *input) {
|
|||
|
||||
static inline int r_asm_pseudo_bits(RAsm *a, const char *input) {
|
||||
if (!(r_asm_set_bits (a, r_num_math (NULL, input)))) {
|
||||
R_LOG_ERROR ("Unsupported value for .bits.");
|
||||
R_LOG_ERROR ("Unsupported value for .bits");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -179,7 +179,7 @@ static inline int r_asm_pseudo_incbin(RAsmOp *op, char *input) {
|
|||
size_t count = (size_t)r_num_math (NULL,r_str_word_get0 (input, 2));
|
||||
char *content = r_file_slurp (input, &bytes_read);
|
||||
if (!content) {
|
||||
R_LOG_ERROR ("Could not open '%s'.", input);
|
||||
R_LOG_ERROR ("Could not open '%s'", input);
|
||||
return -1;
|
||||
}
|
||||
if (skip > 0) {
|
||||
|
@ -1078,7 +1078,7 @@ R_API RAsmCode *r_asm_massemble(RAsm *a, const char *assembly) {
|
|||
ret = r_asm_pseudo_org (a, ptr + 5);
|
||||
off = a->pc;
|
||||
} else if (r_str_startswith (ptr, ".offset ")) {
|
||||
R_LOG_ERROR ("Invalid use of the .offset directory. This directive is only supported in r2 -c 'waf'.");
|
||||
R_LOG_ERROR ("Invalid use of the .offset directory. This directive is only supported in r2 -c 'waf'");
|
||||
} else if (!strncmp (ptr, ".text", 5)) {
|
||||
acode->code_offset = a->pc;
|
||||
} else if (!strncmp (ptr, ".data", 5)) {
|
||||
|
|
|
@ -646,7 +646,7 @@ R_API void r_bin_set_baddr(RBin *bin, ut64 baddr) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
R_LOG_WARN ("This should be an assert probably.");
|
||||
R_LOG_WARN ("This should be an assert probably");
|
||||
}
|
||||
// XXX - update all the infos?
|
||||
// maybe in RBinFile.rebase() ?
|
||||
|
@ -1109,7 +1109,7 @@ R_API void r_bin_list_archs(RBin *bin, PJ *pj, int mode) {
|
|||
"0x%08" PFMT64x ":%" PFMT64u ":%s:%d",
|
||||
boffset, obj_size, "unk", 0);
|
||||
} else {
|
||||
R_LOG_ERROR ("Invalid RBinFile.");
|
||||
R_LOG_ERROR ("Invalid RBinFile");
|
||||
}
|
||||
//sdb_array_push (binfile_sdb, ARCHS_KEY, archline, 0);
|
||||
}
|
||||
|
@ -1151,11 +1151,11 @@ R_API RBuffer *r_bin_create(RBin *bin, const char *p,
|
|||
|
||||
RBinPlugin *plugin = r_bin_get_binplugin_by_name (bin, p);
|
||||
if (!plugin) {
|
||||
R_LOG_WARN ("Cannot find RBin plugin named '%s'.", p);
|
||||
R_LOG_WARN ("Cannot find RBin plugin named '%s'", p);
|
||||
return NULL;
|
||||
}
|
||||
if (!plugin->create) {
|
||||
R_LOG_WARN ("RBin plugin '%s' does not implement \"create\" method.", p);
|
||||
R_LOG_WARN ("RBin plugin '%s' does not implement \"create\" method", p);
|
||||
return NULL;
|
||||
}
|
||||
codelen = R_MAX (codelen, 0);
|
||||
|
|
|
@ -155,7 +155,7 @@ R_IPI RBinObject *r_bin_object_new(RBinFile *bf, RBinPlugin *plugin, ut64 basead
|
|||
return NULL;
|
||||
}
|
||||
} else {
|
||||
R_LOG_WARN ("Plugin %s should implement load_buffer method.", plugin->name);
|
||||
R_LOG_WARN ("Plugin %s should implement load_buffer method", plugin->name);
|
||||
sdb_free (bo->kv);
|
||||
free (bo);
|
||||
return NULL;
|
||||
|
|
|
@ -2088,7 +2088,7 @@ static RBinDwarfDebugInfo *parse_info_raw(Sdb *sdb, RBinDwarfDebugAbbrev *da,
|
|||
}
|
||||
|
||||
if (da->decls->count >= da->capacity) {
|
||||
R_LOG_WARN ("malformed dwarf have not enough buckets for decls.");
|
||||
R_LOG_WARN ("malformed dwarf have not enough buckets for decls");
|
||||
}
|
||||
r_warn_if_fail (da->count <= da->capacity);
|
||||
|
||||
|
|
|
@ -2631,7 +2631,7 @@ ut8 *Elf_(r_bin_elf_grab_regstate)(ELFOBJ *bin, int *len) {
|
|||
return buf;
|
||||
}
|
||||
}
|
||||
R_LOG_DEBUG ("Cannot find NOTE section.");
|
||||
R_LOG_DEBUG ("Cannot find NOTE section");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -3720,7 +3720,7 @@ static RBinElfSymbol* Elf_(_r_bin_elf_get_symbols_imports)(ELFOBJ *bin, int type
|
|||
}
|
||||
void *rett = realloc (ret, (ret_size + nsym) * sizeof (RBinElfSymbol));
|
||||
if (!rett) {
|
||||
R_LOG_ERROR ("Cannot allocate %d symbols.", (int)(nsym + ret_size));
|
||||
R_LOG_ERROR ("Cannot allocate %d symbols", (int)(nsym + ret_size));
|
||||
goto beach;
|
||||
}
|
||||
ret = rett;
|
||||
|
|
|
@ -4145,7 +4145,7 @@ void PE_(r_bin_pe_check_sections)(RBinPEObj* pe, struct r_bin_pe_section_t* * se
|
|||
if (addr_beg <= entry->vaddr || entry->vaddr < addr_end) {
|
||||
if (!(sections[j].perm & PE_IMAGE_SCN_MEM_EXECUTE)) {
|
||||
if (pe->verbose) {
|
||||
R_LOG_WARN ("Found entrypoint in non-executable section.");
|
||||
R_LOG_WARN ("Found entrypoint in non-executable section");
|
||||
}
|
||||
sections[j].perm |= PE_IMAGE_SCN_MEM_EXECUTE;
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ static char *dex_get_proto(RBinDexObj *bin, int proto_id) {
|
|||
// size of the list, in 16 bit entries
|
||||
ut32 list_size = r_read_le32 (params_buf);
|
||||
if (list_size >= ST32_MAX) {
|
||||
R_LOG_WARN ("function prototype contains too many parameters (> 2 million).");
|
||||
R_LOG_WARN ("function prototype contains too many parameters (> 2 million)");
|
||||
list_size = ST32_MAX;
|
||||
}
|
||||
size_t typeidx_bufsize = (list_size * sizeof (ut16));
|
||||
|
@ -1925,27 +1925,27 @@ static void add_segment(RList *ret, const char *name, Section s, int perm) {
|
|||
static bool validate_section(const char *name, Section *pre, Section *cur, Section *nex, Section *all) {
|
||||
r_return_val_if_fail (cur && all, false);
|
||||
if (pre && cur->addr < (pre->addr + pre->size)) {
|
||||
R_LOG_WARN ("%s Section starts before the previous.", name);
|
||||
R_LOG_WARN ("%s Section starts before the previous", name);
|
||||
}
|
||||
if (cur->addr >= all->size) {
|
||||
R_LOG_WARN ("%s section starts beyond the end of the file.", name);
|
||||
R_LOG_WARN ("%s section starts beyond the end of the file", name);
|
||||
return false;
|
||||
}
|
||||
if (cur->addr == UT64_MAX) {
|
||||
R_LOG_WARN ("%s invalid region size.", name);
|
||||
R_LOG_WARN ("%s invalid region size", name);
|
||||
return false;
|
||||
}
|
||||
if ((cur->addr + cur->size) > all->size) {
|
||||
R_LOG_WARN ("%s truncated section because of file size.", name);
|
||||
R_LOG_WARN ("%s truncated section because of file size", name);
|
||||
cur->size = all->size - cur->addr;
|
||||
}
|
||||
if (nex) {
|
||||
if (cur->addr >= nex->addr) {
|
||||
R_LOG_WARN ("invalid %s section address.", name);
|
||||
R_LOG_WARN ("invalid %s section address", name);
|
||||
return false;
|
||||
}
|
||||
if ((cur->addr + cur->size) > nex->addr) {
|
||||
R_LOG_WARN ("truncated %s with next section size.", name);
|
||||
R_LOG_WARN ("truncated %s with next section size", name);
|
||||
cur->size = nex->addr - cur->addr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -547,7 +547,7 @@ static bool _patch_reloc(struct MACH0_(obj_t) *bin, RIOBind *iob, struct reloc_t
|
|||
ins_len = 5;
|
||||
break;
|
||||
default:
|
||||
R_LOG_WARN ("unsupported reloc type for X86_64 (%d), please file a bug.", reloc->type);
|
||||
R_LOG_WARN ("unsupported reloc type for X86_64 (%d), please file a bug", reloc->type);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -188,7 +188,7 @@ static int init_pdb7_root_stream(RPdb *pdb, int *root_page_list, int pages_amoun
|
|||
if ((pos + num_pages) > tmp_data_max_size) {
|
||||
R_FREE (data);
|
||||
R_FREE (sizes);
|
||||
R_LOG_WARN ("looks like there is no correct values of stream size in PDB file.");
|
||||
R_LOG_WARN ("looks like there is no correct values of stream size in PDB file");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ static int pdb_read_root(RPdb *pdb) {
|
|||
while (r_list_iter_next (it)) {
|
||||
page = (SPage *) r_list_iter_get (it);
|
||||
if (page->stream_pages == 0) {
|
||||
//R_LOG_WARN ("no stream pages. Skipping.");
|
||||
R_LOG_DEBUG ("no stream pages. Skipping");
|
||||
r_list_append (pList, NULL);
|
||||
i++;
|
||||
continue;
|
||||
|
@ -438,7 +438,7 @@ static bool pdb7_parse(RPdb *pdb) {
|
|||
|
||||
bytes_read = r_buf_read (pdb->buf, (unsigned char *) signature, PDB7_SIGNATURE_LEN);
|
||||
if (bytes_read != PDB7_SIGNATURE_LEN) {
|
||||
//R_LOG_ERROR ("Error while reading PDB7_SIGNATURE.");
|
||||
//R_LOG_ERROR ("Error while reading PDB7_SIGNATURE");
|
||||
goto error;
|
||||
}
|
||||
if (!read_int_var ("page_size", &page_size, pdb)) {
|
||||
|
@ -465,14 +465,14 @@ static bool pdb7_parse(RPdb *pdb) {
|
|||
num_root_index_pages = count_pages ((num_root_pages * 4), page_size);
|
||||
root_index_pages = (int *) calloc (sizeof (int), R_MAX (num_root_index_pages, 1));
|
||||
if (!root_index_pages) {
|
||||
R_LOG_ERROR ("Error memory allocation.");
|
||||
R_LOG_ERROR ("Error memory allocation");
|
||||
goto error;
|
||||
}
|
||||
|
||||
bytes_read = r_buf_read (pdb->buf, (unsigned char *) root_index_pages, 4 * num_root_index_pages);
|
||||
// fread(root_index_pages, 4, num_root_index_pages, pdb->fp);
|
||||
if (bytes_read != 4 * num_root_index_pages) {
|
||||
R_LOG_ERROR ("Error while reading root_index_pages.");
|
||||
R_LOG_ERROR ("Error while reading root_index_pages");
|
||||
goto error;
|
||||
}
|
||||
if (page_size < 1 || num_root_index_pages < 1) {
|
||||
|
@ -481,7 +481,7 @@ static bool pdb7_parse(RPdb *pdb) {
|
|||
}
|
||||
root_page_data = (int *) calloc (page_size, num_root_index_pages);
|
||||
if (!root_page_data) {
|
||||
R_LOG_ERROR ("memory allocation of root_page_data.");
|
||||
R_LOG_ERROR ("memory allocation of root_page_data");
|
||||
goto error;
|
||||
}
|
||||
p_tmp = root_page_data;
|
||||
|
@ -496,7 +496,7 @@ static bool pdb7_parse(RPdb *pdb) {
|
|||
}
|
||||
root_page_list = (int *) calloc (sizeof(int), num_root_pages);
|
||||
if (!root_page_list) {
|
||||
R_LOG_ERROR ("memory allocation of root page.");
|
||||
R_LOG_ERROR ("memory allocation of root page");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ static RBreakpointItem *r_bp_add(RBreakpoint *bp, const ut8 *obytes, ut64 addr,
|
|||
return NULL;
|
||||
}
|
||||
if (r_bp_get_in (bp, addr, perm)) {
|
||||
R_LOG_WARN ("Breakpoint already set at this address.");
|
||||
R_LOG_WARN ("Breakpoint already set at this address");
|
||||
return NULL;
|
||||
}
|
||||
b = r_bp_item_new (bp);
|
||||
|
@ -170,10 +170,10 @@ static RBreakpointItem *r_bp_add(RBreakpoint *bp, const ut8 *obytes, ut64 addr,
|
|||
}
|
||||
b->addr = addr + bp->delta;
|
||||
if (bp->baddr > addr) {
|
||||
R_LOG_WARN ("base addr should not be larger than the breakpoint address.");
|
||||
R_LOG_WARN ("base addr should not be larger than the breakpoint address");
|
||||
}
|
||||
if (bp->bpinmaps && !r_bp_is_valid (bp, b)) {
|
||||
R_LOG_WARN ("Cannot set breakpoint outside maps. Use dbg.bpinmaps to false.");
|
||||
R_LOG_WARN ("Cannot set breakpoint outside maps. Use dbg.bpinmaps to false");
|
||||
}
|
||||
b->delta = addr - bp->baddr;
|
||||
b->size = size;
|
||||
|
|
|
@ -1876,7 +1876,7 @@ R_API void r_cons_set_utf8(bool b) {
|
|||
r_sys_perror ("r_cons_set_utf8");
|
||||
}
|
||||
} else {
|
||||
R_LOG_WARN ("UTF-8 Codepage not installed.");
|
||||
R_LOG_WARN ("UTF-8 Codepage not installed");
|
||||
}
|
||||
} else {
|
||||
UINT acp = GetACP ();
|
||||
|
|
|
@ -59,7 +59,7 @@ static void filesave(void) {
|
|||
}
|
||||
}
|
||||
if (!path) {
|
||||
R_LOG_ERROR ("No file given.");
|
||||
R_LOG_ERROR ("No file given");
|
||||
return;
|
||||
}
|
||||
if (lines) {
|
||||
|
@ -91,7 +91,7 @@ R_API char *r_cons_editor(const char *file, const char *str) {
|
|||
lines = r_file_slurp (file, &sz);
|
||||
bytes = (int)sz;
|
||||
if (!lines) {
|
||||
R_LOG_ERROR ("Failed to load '%s'.", file);
|
||||
R_LOG_ERROR ("Failed to load '%s'", file);
|
||||
R_FREE (path);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ R_API char *r_cons_hud_file(const char *f) {
|
|||
// the lines starting with # )
|
||||
R_API char *r_cons_hud_line_string(const char *s) {
|
||||
if (!r_cons_is_interactive ()) {
|
||||
R_LOG_ERROR ("Hud mode requires scr.interactive=true.");
|
||||
R_LOG_ERROR ("Hud mode requires scr.interactive=true");
|
||||
return NULL;
|
||||
}
|
||||
char *os, *track, *ret, *o = strdup (s);
|
||||
|
@ -59,7 +59,7 @@ R_API char *r_cons_hud_line_string(const char *s) {
|
|||
// the lines starting with # )
|
||||
R_API char *r_cons_hud_string(const char *s) {
|
||||
if (!r_cons_is_interactive ()) {
|
||||
R_LOG_ERROR ("Hud mode requires scr.interactive=true.");
|
||||
R_LOG_ERROR ("Hud mode requires scr.interactive=true");
|
||||
return NULL;
|
||||
}
|
||||
char *os, *track, *ret, *o = strdup (s);
|
||||
|
|
|
@ -19,7 +19,7 @@ static const char *r_cons_less_help = \
|
|||
R_API int r_cons_less_str(const char *str, const char *exitkeys) {
|
||||
r_return_val_if_fail (str && *str, 0);
|
||||
if (!r_cons_is_interactive ()) {
|
||||
R_LOG_ERROR ("Internal less requires scr.interactive=true.");
|
||||
R_LOG_ERROR ("Internal less requires scr.interactive=true");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -583,7 +583,7 @@ repeat:
|
|||
for (j = 0; j < bblist_size; j++) {
|
||||
bb = r_anal_get_block_at (core->anal, bblist[j]);
|
||||
if (!bb) {
|
||||
R_LOG_WARN ("basic block at 0x%08"PFMT64x" was removed during analysis.", bblist[j]);
|
||||
R_LOG_WARN ("basic block at 0x%08"PFMT64x" was removed during analysis", bblist[j]);
|
||||
retries--;
|
||||
free (bblist);
|
||||
goto repeat;
|
||||
|
@ -636,7 +636,7 @@ repeat:
|
|||
if (i < bblist_size) {
|
||||
bb = r_anal_get_block_at (core->anal, bb_addr);
|
||||
if (!bb) {
|
||||
R_LOG_WARN ("basic block at 0x%08"PFMT64x" was removed during analysis.", bblist[i]);
|
||||
R_LOG_WARN ("basic block at 0x%08"PFMT64x" was removed during analysis", bblist[i]);
|
||||
retries--;
|
||||
free (bblist);
|
||||
goto repeat;
|
||||
|
|
|
@ -997,7 +997,7 @@ R_API RAnalOp* r_core_anal_op(RCore *core, ut64 addr, int mask) {
|
|||
if (!op->mnemonic && mask & R_ANAL_OP_MASK_DISASM) {
|
||||
RAsmOp asmop;
|
||||
if (core->anal->verbose) {
|
||||
R_LOG_WARN ("Implement RAnalOp.MASK_DISASM for current anal.arch. Using the sluggish RAsmOp fallback for now.");
|
||||
R_LOG_WARN ("Implement RAnalOp.MASK_DISASM for current anal.arch. Using the sluggish RAsmOp fallback for now");
|
||||
}
|
||||
r_asm_set_pc (core->rasm, addr);
|
||||
r_asm_op_init (&asmop);
|
||||
|
@ -5234,7 +5234,7 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
|
|||
return;
|
||||
}
|
||||
if (iend > MAX_SCAN_SIZE) {
|
||||
R_LOG_WARN ("Not going to analyze 0x%08"PFMT64x" bytes.", (ut64)iend);
|
||||
R_LOG_WARN ("Not going to analyze 0x%08"PFMT64x" bytes", (ut64)iend);
|
||||
return;
|
||||
}
|
||||
buf = malloc ((size_t)iend + 2);
|
||||
|
@ -5256,7 +5256,7 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
|
|||
}
|
||||
const char *kspname = r_reg_get_name (core->anal->reg, R_REG_NAME_SP);
|
||||
if (R_STR_ISEMPTY (kspname)) {
|
||||
R_LOG_ERROR ("No =SP defined in the reg profile.");
|
||||
R_LOG_ERROR ("No =SP defined in the reg profile");
|
||||
return;
|
||||
}
|
||||
char *spname = strdup (kspname);
|
||||
|
@ -5415,7 +5415,7 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
|
|||
}
|
||||
const char *sn = r_reg_get_name (core->anal->reg, R_REG_NAME_SN);
|
||||
if (!sn) {
|
||||
R_LOG_WARN ("No SN reg alias for current architecture.");
|
||||
R_LOG_WARN ("No SN reg alias for current architecture");
|
||||
}
|
||||
if (sn && op.type == R_ANAL_OP_TYPE_SWI) {
|
||||
r_strf_buffer (64);
|
||||
|
|
|
@ -781,11 +781,11 @@ R_API void r_core_anal_cc_init(RCore *core) {
|
|||
char *s = r_reg_profile_to_cc (core->anal->reg);
|
||||
if (s) {
|
||||
if (!r_anal_cc_set (core->anal, s)) {
|
||||
R_LOG_WARN ("Invalid CC from reg profile.");
|
||||
R_LOG_WARN ("Invalid CC from reg profile");
|
||||
}
|
||||
free (s);
|
||||
} else {
|
||||
R_LOG_WARN ("Cannot derive CC from reg profile.");
|
||||
R_LOG_WARN ("Cannot derive CC from reg profile");
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -808,11 +808,11 @@ R_API void r_core_anal_cc_init(RCore *core) {
|
|||
char *s = r_reg_profile_to_cc (core->anal->reg);
|
||||
if (s) {
|
||||
if (!r_anal_cc_set (core->anal, s)) {
|
||||
R_LOG_WARN ("Invalid CC from reg profile.");
|
||||
R_LOG_WARN ("Invalid CC from reg profile");
|
||||
}
|
||||
free (s);
|
||||
} else {
|
||||
R_LOG_WARN ("Cannot derive CC from reg profile.");
|
||||
R_LOG_WARN ("Cannot derive CC from reg profile");
|
||||
}
|
||||
}
|
||||
R_FREE (cc->path);
|
||||
|
@ -825,7 +825,7 @@ R_API void r_core_anal_cc_init(RCore *core) {
|
|||
cc->path = strdup (dbpath);
|
||||
}
|
||||
if (anal_arch && sdb_isempty (core->anal->sdb_cc)) {
|
||||
R_LOG_WARN ("Missing calling conventions for '%s' %d. Deriving it from the regprofile.", anal_arch, bits);
|
||||
R_LOG_WARN ("Missing calling conventions for '%s' %d. Deriving it from the regprofile", anal_arch, bits);
|
||||
}
|
||||
free (anal_arch);
|
||||
free (dbpath);
|
||||
|
|
|
@ -1355,7 +1355,7 @@ static bool cb_cfgcharset(void *user, void *data) {
|
|||
if (rc) {
|
||||
r_sys_setenv ("RABIN2_CHARSET", cf);
|
||||
} else {
|
||||
R_LOG_WARN ("Cannot load charset file '%s'.", cf);
|
||||
R_LOG_WARN ("Cannot load charset file '%s'", cf);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
|
@ -1746,7 +1746,7 @@ static bool cb_dbg_execs(void *user, void *data) {
|
|||
}
|
||||
#else
|
||||
if (node->i_value) {
|
||||
R_LOG_WARN ("dbg.execs is not supported in this platform.");
|
||||
R_LOG_WARN ("dbg.execs is not supported in this platform");
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
|
@ -2287,7 +2287,7 @@ static bool cb_io_pava(void *user, void *data) {
|
|||
RConfigNode *node = (RConfigNode *) data;
|
||||
core->print->pava = node->i_value;
|
||||
if (node->i_value && core->io->va) {
|
||||
R_LOG_WARN ("You may probably want to disable io.va too.");
|
||||
R_LOG_WARN ("You may probably want to disable io.va too");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -3292,7 +3292,7 @@ static bool cb_prjvctype(void *user, void *data) {
|
|||
if (!strcmp (node->value, "rvc")) {
|
||||
return true;
|
||||
}
|
||||
R_LOG_ERROR ("Unknown version control '%s'.", node->value);
|
||||
R_LOG_ERROR ("Unknown version control '%s'", node->value);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ static int r_core_file_do_load_for_io_plugin(RCore *r, ut64 baseaddr, ut64 loada
|
|||
binfile = r_bin_cur (r->bin);
|
||||
if (r_core_bin_set_env (r, binfile)) {
|
||||
if (r->anal->verbose && !sdb_const_get (r->anal->sdb_cc, "default.cc", 0)) {
|
||||
R_LOG_WARN ("No calling convention defined for this file, analysis may be inaccurate.");
|
||||
R_LOG_WARN ("No calling convention defined for this file, analysis may be inaccurate");
|
||||
}
|
||||
}
|
||||
plugin = r_bin_file_cur_plugin (binfile);
|
||||
|
@ -725,7 +725,7 @@ R_API bool r_core_bin_load(RCore *r, const char *filenameuri, ut64 baddr) {
|
|||
}
|
||||
r_core_cmd0 (r, "obb 0;s entry0");
|
||||
r_config_set_i (r->config, "bin.at", true);
|
||||
R_LOG_INFO ("[bin.libs] Linking imports...");
|
||||
R_LOG_INFO ("[bin.libs] Linking imports");
|
||||
RBinImport *imp;
|
||||
const RList *imports = r_bin_get_imports (r->bin);
|
||||
r_list_foreach (imports, iter, imp) {
|
||||
|
|
|
@ -1674,7 +1674,7 @@ static void load_table_asciiart(RCore *core, RTable *t, RList *lines) {
|
|||
RListIter *iter2;
|
||||
ncols = 0;
|
||||
if (r_list_length (t->cols) > 0) {
|
||||
R_LOG_WARN ("Not re-adding headers. Use ,- to reset the table.");
|
||||
R_LOG_WARN ("Not re-adding headers. Use ,- to reset the table");
|
||||
continue;
|
||||
}
|
||||
r_list_foreach (args, iter2, arg) {
|
||||
|
@ -5436,7 +5436,7 @@ static int run_cmd_depth(RCore *core, char *cmd) {
|
|||
int ret = false;
|
||||
|
||||
if (core->cons->context->cmd_depth < 1) {
|
||||
R_LOG_ERROR ("That '%s' was too deep...", cmd);
|
||||
R_LOG_ERROR ("That '%s' was too deep", cmd);
|
||||
return false;
|
||||
}
|
||||
core->cons->context->cmd_depth--;
|
||||
|
|
|
@ -1194,7 +1194,7 @@ static bool cmd_anal_aaft(RCore *core) {
|
|||
const char *io_cache_key = "io.pcache.write";
|
||||
bool io_cache = r_config_get_b (core->config, io_cache_key);
|
||||
if (r_config_get_b (core->config, "cfg.debug")) {
|
||||
R_LOG_WARN ("aaft is disabled in debugger mode.");
|
||||
R_LOG_WARN ("aaft is disabled in debugger mode");
|
||||
return false;
|
||||
}
|
||||
if (!io_cache) {
|
||||
|
@ -1264,7 +1264,7 @@ static void find_refs(RCore *core, const char *glob) {
|
|||
eprintf ("Usage: axF [flag-str-filter]\n");
|
||||
return;
|
||||
}
|
||||
R_LOG_WARN ("Finding references of flags matching '%s'...", glob);
|
||||
R_LOG_WARN ("Finding references of flags matching '%s'", glob);
|
||||
char *cmd = r_str_newf (".(findstref) @@=`f~%s[0]`", glob);
|
||||
r_core_cmd0 (core, "(findstref;f here=$$;s entry0;/r here;f-here)");
|
||||
r_core_cmd0 (core, cmd);
|
||||
|
@ -2380,7 +2380,7 @@ static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int
|
|||
r_anal_esil_stack_free (esil);
|
||||
esil = NULL;
|
||||
} else {
|
||||
R_LOG_ERROR ("ESIL is not initialized. Run `aei`.");
|
||||
R_LOG_ERROR ("ESIL is not initialized. Run `aei`");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
@ -7514,11 +7514,11 @@ static void cmd_anal_esil(RCore *core, const char *input, bool verbose) {
|
|||
switch (input[2]) {
|
||||
case '+': // "aets+"
|
||||
if (!esil) {
|
||||
R_LOG_ERROR ("ESIL is not initialized. Use `aeim` first.");
|
||||
R_LOG_ERROR ("ESIL is not initialized. Use `aeim` first");
|
||||
break;
|
||||
}
|
||||
if (esil->trace) {
|
||||
eprintf ("ESIL trace already started\n");
|
||||
R_LOG_INFO ("ESIL trace already started");
|
||||
break;
|
||||
}
|
||||
esil->trace = r_anal_esil_trace_new (esil);
|
||||
|
@ -7529,7 +7529,7 @@ static void cmd_anal_esil(RCore *core, const char *input, bool verbose) {
|
|||
break;
|
||||
case '-': // "aets-"
|
||||
if (!esil) {
|
||||
R_LOG_ERROR ("ESIL is not initialized. Use `aeim` first.");
|
||||
R_LOG_ERROR ("ESIL is not initialized. Use `aeim` first");
|
||||
break;
|
||||
}
|
||||
if (!esil->trace) {
|
||||
|
@ -11715,9 +11715,9 @@ static void cmd_anal_class_method(RCore *core, const char *input) {
|
|||
end = strchr (name_str, ' ');
|
||||
if (!end) {
|
||||
if (c == ' ') {
|
||||
R_LOG_ERROR ("No offset given.");
|
||||
R_LOG_ERROR ("No offset given");
|
||||
} else if (c == 'n') {
|
||||
R_LOG_ERROR ("No new method name given.");
|
||||
R_LOG_ERROR ("No new method name given");
|
||||
}
|
||||
free (cstr);
|
||||
break;
|
||||
|
|
|
@ -269,7 +269,7 @@ static void cmd_tcc(RCore *core, const char *input) {
|
|||
case ' ':
|
||||
if (strchr (input, '(')) {
|
||||
if (!r_anal_cc_set (core->anal, input + 1)) {
|
||||
R_LOG_ERROR ("Invalid syntax in cc signature.");
|
||||
R_LOG_ERROR ("Invalid syntax in cc signature");
|
||||
}
|
||||
} else {
|
||||
const char *ccname = r_str_trim_head_ro (input + 1);
|
||||
|
|
|
@ -874,7 +874,7 @@ static int r_cmd_java_handle_replace_classname_value(RCore *core, const char *cm
|
|||
core, obj, idx, addr,
|
||||
(const ut8 *)result, res_len);
|
||||
if (res == false) {
|
||||
R_LOG_ERROR ("ERROR: r_cmd_java: Failed to write bytes or reload the binary.");
|
||||
R_LOG_ERROR ("ERROR: r_cmd_java: Failed to write bytes or reload the binary");
|
||||
}
|
||||
}
|
||||
free (result);
|
||||
|
@ -1433,7 +1433,7 @@ static int r_cmd_java_handle_set_flags(RCore *core, const char *input) {
|
|||
default: flag_value = -1;
|
||||
}
|
||||
}
|
||||
IFDBG r_cons_printf ("Current args: (flag_value: 0x%04x addr: 0x%" PFMT64x ")\n.", flag_value, addr);
|
||||
IFDBG r_cons_printf ("Current args: (flag_value: 0x%04x addr: 0x%" PFMT64x ")\n", flag_value, addr);
|
||||
if (flag_value != -1) {
|
||||
res = r_cmd_java_set_acc_flags (core, addr, ((ut16)flag_value) & 0xffff);
|
||||
IFDBG r_cons_printf ("Writing 0x%04x to 0x%" PFMT64x ": %d.", flag_value, addr, res);
|
||||
|
@ -1739,7 +1739,7 @@ static int r_cmd_java_print_method_num_name(RBinJavaObj *obj) {
|
|||
static int r_cmd_java_print_field_summary(RBinJavaObj *obj, ut16 idx) {
|
||||
int res = r_bin_java_print_field_idx_summary (obj, idx);
|
||||
if (res == false) {
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj.", idx);
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj", idx);
|
||||
res = true;
|
||||
}
|
||||
return res;
|
||||
|
@ -1757,7 +1757,7 @@ static int r_cmd_java_print_field_name(RBinJavaObj *obj, ut16 idx) {
|
|||
if (res) {
|
||||
r_cons_println (res);
|
||||
} else {
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj.", idx);
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj", idx);
|
||||
}
|
||||
free (res);
|
||||
return true;
|
||||
|
@ -1766,7 +1766,7 @@ static int r_cmd_java_print_field_name(RBinJavaObj *obj, ut16 idx) {
|
|||
static int r_cmd_java_print_method_summary(RBinJavaObj *obj, ut16 idx) {
|
||||
int res = r_bin_java_print_method_idx_summary (obj, idx);
|
||||
if (res == false) {
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj.", idx);
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj", idx);
|
||||
res = true;
|
||||
}
|
||||
return res;
|
||||
|
@ -1784,7 +1784,7 @@ static int r_cmd_java_print_method_name(RBinJavaObj *obj, ut16 idx) {
|
|||
if (res) {
|
||||
r_cons_println (res);
|
||||
} else {
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj.", idx);
|
||||
R_LOG_ERROR ("Field or Method @ index (%d) not found in the RBinJavaObj", idx);
|
||||
}
|
||||
free (res);
|
||||
return true;
|
||||
|
|
|
@ -678,20 +678,20 @@ R_API void r_core_rtr_pushout(RCore *core, const char *input) {
|
|||
|
||||
switch (rtr_host[rtr_n].proto) {
|
||||
case RTR_PROTOCOL_RAP:
|
||||
R_LOG_ERROR ("Cannot use '=<' to a rap connection.");
|
||||
R_LOG_ERROR ("Cannot use '=<' to a rap connection");
|
||||
break;
|
||||
case RTR_PROTOCOL_UNIX:
|
||||
r_socket_write (rtr_host[rtr_n].fd, str, strlen (str));
|
||||
break;
|
||||
case RTR_PROTOCOL_HTTP:
|
||||
eprintf ("TODO\n");
|
||||
R_LOG_INFO ("TODO");
|
||||
break;
|
||||
case RTR_PROTOCOL_TCP:
|
||||
case RTR_PROTOCOL_UDP:
|
||||
r_socket_write (rtr_host[rtr_n].fd, str, strlen (str));
|
||||
break;
|
||||
default:
|
||||
eprintf ("Unknown protocol\n");
|
||||
R_LOG_ERROR ("Unknown protocol");
|
||||
break;
|
||||
}
|
||||
free (str);
|
||||
|
|
|
@ -341,7 +341,7 @@ static bool GetLFHKey(RDebug *dbg, HANDLE h_proc, bool segment, WPARAM *lfhKey)
|
|||
}
|
||||
if (!ReadProcessMemory (h_proc, (PVOID)lfhKeyLocation, lfhKey, sizeof (WPARAM), NULL)) {
|
||||
r_sys_perror ("ReadProcessMemory");
|
||||
R_LOG_WARN ("LFH key not found.");
|
||||
R_LOG_WARN ("LFH key not found");
|
||||
*lfhKey = 0;
|
||||
return false;
|
||||
}
|
||||
|
@ -740,7 +740,7 @@ static PDEBUG_BUFFER GetHeapBlocks(DWORD pid, RDebug *dbg) {
|
|||
if (!GetLFHKey (dbg, h_proc, false, &lfhKey)) {
|
||||
RtlDestroyQueryDebugBuffer (db);
|
||||
CloseHandle (h_proc);
|
||||
R_LOG_ERROR ("GetHeapBlocks: Failed to get LFH key.");
|
||||
R_LOG_ERROR ("GetHeapBlocks: Failed to get LFH key");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -954,12 +954,12 @@ static PHeapBlock GetSingleSegmentBlock(RDebug *dbg, HANDLE h_proc, PSEGMENT_HEA
|
|||
*/
|
||||
PHeapBlock hb = R_NEW0 (HeapBlock);
|
||||
if (!hb) {
|
||||
R_LOG_ERROR ("GetSingleSegmentBlock: Allocation failed.");
|
||||
R_LOG_ERROR ("GetSingleSegmentBlock: Allocation failed");
|
||||
return NULL;
|
||||
}
|
||||
PHeapBlockExtraInfo extra = R_NEW0 (HeapBlockExtraInfo);
|
||||
if (!extra) {
|
||||
R_LOG_ERROR ("GetSingleSegmentBlock: Allocation failed.");
|
||||
R_LOG_ERROR ("GetSingleSegmentBlock: Allocation failed");
|
||||
goto err;
|
||||
}
|
||||
hb->extraInfo = extra;
|
||||
|
@ -1058,7 +1058,7 @@ static PHeapBlock GetSingleBlock(RDebug *dbg, ut64 offset) {
|
|||
PHeapBlockExtraInfo extra = NULL;
|
||||
|
||||
if (!hb) {
|
||||
R_LOG_ERROR ("GetSingleBlock: Allocation failed.");
|
||||
R_LOG_ERROR ("GetSingleBlock: Allocation failed");
|
||||
return NULL;
|
||||
}
|
||||
HANDLE h_proc = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dbg->pid);
|
||||
|
@ -1072,7 +1072,7 @@ static PHeapBlock GetSingleBlock(RDebug *dbg, ut64 offset) {
|
|||
}
|
||||
extra = R_NEW0 (HeapBlockExtraInfo);
|
||||
if (!extra) {
|
||||
R_LOG_ERROR ("GetSingleBlock: Allocation failed.");
|
||||
R_LOG_ERROR ("GetSingleBlock: Allocation failed");
|
||||
goto err;
|
||||
}
|
||||
WPARAM NtLFHKey;
|
||||
|
@ -1185,7 +1185,7 @@ static void w32_list_heaps(RCore *core, const char format) {
|
|||
db = GetHeapBlocks (pid, core->dbg);
|
||||
}
|
||||
if (!db) {
|
||||
R_LOG_WARN ("Couldn't get heap info.");
|
||||
R_LOG_WARN ("Couldn't get heap info");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1239,7 +1239,7 @@ static void w32_list_heaps_blocks(RCore *core, const char format) {
|
|||
db = InitHeapInfo (core->dbg, PDI_HEAPS | PDI_HEAP_BLOCKS);
|
||||
}
|
||||
if (!db) {
|
||||
R_LOG_ERROR ("Couldn't get heap info.");
|
||||
R_LOG_ERROR ("Couldn't get heap info");
|
||||
return;
|
||||
}
|
||||
PHeapInformation heapInfo = db->HeapInformation;
|
||||
|
|
|
@ -220,7 +220,7 @@ R_API bool r_debug_session_add_reg_change(RDebugSession *session, int arena, ut6
|
|||
if (!vreg) {
|
||||
vreg = r_vector_new (sizeof (RDebugChangeReg), NULL, NULL);
|
||||
if (!vreg) {
|
||||
R_LOG_ERROR ("creating a register vector.");
|
||||
R_LOG_ERROR ("creating a register vector");
|
||||
return false;
|
||||
}
|
||||
ht_up_insert (session->registers, offset | (arena << 16), vreg);
|
||||
|
@ -235,7 +235,7 @@ R_API bool r_debug_session_add_mem_change(RDebugSession *session, ut64 addr, ut8
|
|||
if (!vmem) {
|
||||
vmem = r_vector_new (sizeof (RDebugChangeMem), NULL, NULL);
|
||||
if (!vmem) {
|
||||
R_LOG_ERROR ("creating a memory vector.");
|
||||
R_LOG_ERROR ("creating a memory vector");
|
||||
return false;
|
||||
}
|
||||
ht_up_insert (session->memory, addr, vmem);
|
||||
|
@ -481,7 +481,7 @@ static bool deserialize_memory_cb(void *user, const char *addr, const char *v) {
|
|||
// Insert a new vector into `memory` HtUP at `addr`
|
||||
RVector *vmem = r_vector_new (sizeof (RDebugChangeMem), NULL, NULL);
|
||||
if (!vmem) {
|
||||
R_LOG_ERROR ("failed to allocate RVector vmem.");
|
||||
R_LOG_ERROR ("failed to allocate RVector vmem");
|
||||
free (json_str);
|
||||
r_json_free (reg_json);
|
||||
return false;
|
||||
|
@ -530,7 +530,7 @@ static bool deserialize_registers_cb(void *user, const char *addr, const char *v
|
|||
HtUP *registers = user;
|
||||
RVector *vreg = r_vector_new (sizeof (RDebugChangeReg), NULL, NULL);
|
||||
if (!vreg) {
|
||||
R_LOG_ERROR ("failed to allocate RVector vreg.");
|
||||
R_LOG_ERROR ("failed to allocate RVector vreg");
|
||||
r_json_free (reg_json);
|
||||
free (json_str);
|
||||
return true;
|
||||
|
|
|
@ -373,7 +373,7 @@ static bool r_debug_gdb_attach(RDebug *dbg, int pid) {
|
|||
int bits = dbg->anal->config->bits;
|
||||
gdbr_set_architecture (desc, arch, bits);
|
||||
} else {
|
||||
R_LOG_ERROR ("ERROR: Underlying IO descriptor is not a GDB one..");
|
||||
R_LOG_ERROR ("ERROR: Underlying IO descriptor is not a GDB one");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -239,7 +239,7 @@ static bool r_debug_native_continue(RDebug *dbg, int pid, int tid, int sig) {
|
|||
r_list_foreach (dbg->threads, it, th) {
|
||||
ret = r_debug_ptrace (dbg, PTRACE_CONT, th->pid, 0, 0);
|
||||
if (ret) {
|
||||
R_LOG_ERROR ("(%d) is running or dead.", th->pid);
|
||||
R_LOG_ERROR ("(%d) is running or dead", th->pid);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1587,7 +1587,7 @@ static int r_debug_setup_ownership(int fd, RDebug *dbg) {
|
|||
RDebugInfo *info = r_debug_info (dbg, NULL);
|
||||
|
||||
if (!info) {
|
||||
R_LOG_ERROR ("Error while getting debug info.");
|
||||
R_LOG_ERROR ("Error while getting debug info");
|
||||
return -1;
|
||||
}
|
||||
fchown (fd, info->uid, info->gid);
|
||||
|
|
|
@ -35,7 +35,7 @@ static bool __rap_attach(RDebug *dbg, int pid) {
|
|||
if (!strcmp ("rap", d->plugin->name)) {
|
||||
eprintf ("SUCCESS: rap attach with inferior rap rio worked\n");
|
||||
} else {
|
||||
R_LOG_ERROR ("ERROR: Underlying IO descriptor is not a rap one..");
|
||||
R_LOG_ERROR ("ERROR: Underlying IO descriptor is not a rap one");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -48,7 +48,6 @@ static PTHREAD_ITEM __r_debug_thread_add(RDebug *dbg, DWORD pid, DWORD tid, HAND
|
|||
}
|
||||
pthread = R_NEW0 (THREAD_ITEM);
|
||||
if (!pthread) {
|
||||
R_LOG_ERROR ("__r_debug_thread_add: Memory allocation failed.");
|
||||
return NULL;
|
||||
}
|
||||
*pthread = th;
|
||||
|
|
|
@ -44,7 +44,7 @@ R_API RDebugSnap *r_debug_snap_map(RDebug *dbg, RDebugMap *map) {
|
|||
r_debug_snap_free (snap);
|
||||
return NULL;
|
||||
}
|
||||
R_LOG_ERROR ("Reading %d byte(s) from 0x%08"PFMT64x "...", snap->size, snap->addr);
|
||||
R_LOG_ERROR ("Reading %d byte(s) from 0x%08"PFMT64x, snap->size, snap->addr);
|
||||
dbg->iob.read_at (dbg->iob.io, snap->addr, snap->data, snap->size);
|
||||
|
||||
return snap;
|
||||
|
|
|
@ -76,7 +76,7 @@ R_API bool r_debug_trace_ins_before(RDebug *dbg) {
|
|||
break;
|
||||
case R_ANAL_VAL_MEM:
|
||||
if (val->memref > 32) {
|
||||
R_LOG_ERROR ("adding changes to %d bytes in memory.", val->memref);
|
||||
R_LOG_ERROR ("adding changes to %d bytes in memory", val->memref);
|
||||
r_list_delete (dbg->cur_op->access, it);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -372,7 +372,7 @@ R_API bool r_egg_compile(REgg *egg) {
|
|||
for (; b; ) {
|
||||
r_egg_lang_parsechar (egg, b);
|
||||
if (egg->lang.elem_n >= sizeof (egg->lang.elem)) {
|
||||
R_LOG_ERROR ("ERROR: elem too large.");
|
||||
R_LOG_ERROR ("too large element");
|
||||
break;
|
||||
}
|
||||
size_t r = r_buf_read (egg->src, (ut8 *)&b, sizeof (b));
|
||||
|
@ -382,7 +382,7 @@ R_API bool r_egg_compile(REgg *egg) {
|
|||
// XXX: some parse fail errors are false positives :(
|
||||
}
|
||||
if (egg->context > 0) {
|
||||
R_LOG_ERROR ("ERROR: expected '}' at the end of the file. %d left", egg->context);
|
||||
R_LOG_ERROR ("expected '}' at the end of the file. %d left", egg->context);
|
||||
return false;
|
||||
}
|
||||
// TODO: handle errors here
|
||||
|
|
|
@ -177,7 +177,7 @@ static int fork_and_ptraceme(RIO *io, int bits, const char *cmd) {
|
|||
return pid;
|
||||
|
||||
err_fork:
|
||||
R_LOG_ERROR ("Cannot create new process.");
|
||||
R_LOG_ERROR ("Cannot create new process");
|
||||
TerminateProcess (pi.hProcess, 1);
|
||||
r_w32dw_free (io->dbgwrap);
|
||||
io->dbgwrap = NULL;
|
||||
|
@ -257,7 +257,7 @@ static RRunProfile* _get_run_profile(RIO *io, int bits, char **argv) {
|
|||
rp->_dodebug = true;
|
||||
if (io->runprofile && *io->runprofile) {
|
||||
if (!r_run_parsefile (rp, io->runprofile)) {
|
||||
eprintf ("Can't find profile '%s'\n", io->runprofile);
|
||||
R_LOG_ERROR ("Can't find profile '%s'", io->runprofile);
|
||||
r_run_free (rp);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ static RRunProfile* _get_run_profile(RIO *io, int bits, char **argv) {
|
|||
}
|
||||
} else if (io->envprofile) {
|
||||
if (!r_run_parse (rp, io->envprofile)) {
|
||||
eprintf ("Can't parse default rarun2 profile\n");
|
||||
R_LOG_ERROR ("Can't parse default rarun2 profile");
|
||||
r_run_free (rp);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ static RRunProfile* _get_run_profile(RIO *io, int bits, char **argv) {
|
|||
}
|
||||
free (expr);
|
||||
if (r_run_config_env (rp)) {
|
||||
eprintf ("Can't config the environment.\n");
|
||||
R_LOG_ERROR ("Cannot configure the environment");
|
||||
r_run_free (rp);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ static int update_self_regions(RIO *io, int pid) {
|
|||
HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, 0, pid);
|
||||
LPTSTR name = calloc (name_size, sizeof (TCHAR));
|
||||
if (!name) {
|
||||
R_LOG_ERROR ("io_self/update_self_regions: Failed to allocate memory.");
|
||||
R_LOG_ERROR ("io_self/update_self_regions: Failed to allocate memory");
|
||||
CloseHandle (h);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -321,7 +321,7 @@ static RList *r_io_zip_open_many(RIO *io, const char *file, int rw, int mode) {
|
|||
filename_in_zipfile, ZIP_CREATE, mode, rw);
|
||||
|
||||
if (zfo && zfo->entry == -1) {
|
||||
R_LOG_WARN ("File did not exist, creating a new one.");
|
||||
R_LOG_WARN ("File did not exist, creating a new one");
|
||||
}
|
||||
if (zfo) {
|
||||
zfo->io_backref = io;
|
||||
|
@ -499,7 +499,7 @@ static RIODesc *r_io_zip_open(RIO *io, const char *file, int rw, int mode) {
|
|||
RIOZipFileObj *zfo = r_io_zip_alloc_zipfileobj (zip_filename, filename_in_zipfile, ZIP_CREATE, mode, rw);
|
||||
if (zfo) {
|
||||
if (zfo->entry == -1) {
|
||||
R_LOG_WARN ("File did not exist, creating a new one.");
|
||||
R_LOG_WARN ("File did not exist, creating a new one");
|
||||
}
|
||||
zfo->io_backref = io;
|
||||
res = r_io_desc_new (io, &r_io_plugin_zip, zfo->name, rw, mode, zfo);
|
||||
|
|
|
@ -1000,7 +1000,7 @@ R_API int r_main_radare2(int argc, const char **argv) {
|
|||
|
||||
if (pfile && r_file_is_directory (pfile)) {
|
||||
if (debug) {
|
||||
R_LOG_ERROR ("Cannot debug directories, yet.");
|
||||
R_LOG_ERROR ("Cannot debug directories, yet");
|
||||
LISTS_FREE ();
|
||||
free (pfile);
|
||||
R_FREE (debugbackend);
|
||||
|
|
|
@ -56,7 +56,7 @@ static const char *parse_def(RReg *reg, char **tok, const int n) {
|
|||
return "Invalid register type";
|
||||
}
|
||||
if (r_reg_get (reg, tok[1], R_REG_TYPE_ALL)) {
|
||||
R_LOG_WARN ("Duplicated register definition for '%s' has been ignored.", tok[1]);
|
||||
R_LOG_WARN ("Duplicated register definition for '%s' has been ignored", tok[1]);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ static void dyn_init(void) {
|
|||
if (!(dyn_openpty && dyn_login_tty && dyn_forkpty)) {
|
||||
void *libutil;
|
||||
if (!(libutil = r_lib_dl_open ("libutil." R_LIB_EXT))) {
|
||||
eprintf ("[ERROR] rarun2: Could not find PTY utils, failed to load %s\n", "libutil." R_LIB_EXT);
|
||||
R_LOG_ERROR ("rarun2: Could not find PTY utils, failed to load libutil" R_LIB_EXT);
|
||||
return;
|
||||
}
|
||||
if (!dyn_openpty) {
|
||||
|
@ -1242,7 +1242,7 @@ R_API int r_run_start(RRunProfile *p) {
|
|||
#endif
|
||||
} else {
|
||||
if (p->_pidfile) {
|
||||
R_LOG_WARN ("pidfile doesnt work with 'system'.");
|
||||
R_LOG_WARN ("pidfile doesnt work with 'system'");
|
||||
}
|
||||
rc = r_sys_cmd (p->_system);
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ R_API bool r_socket_connect(RSocket *s, const char *host, const char *port, int
|
|||
WSADATA wsadata;
|
||||
|
||||
if (WSAStartup (MAKEWORD (1, 1), &wsadata) == SOCKET_ERROR) {
|
||||
R_LOG_ERROR ("Error creating socket.");
|
||||
R_LOG_ERROR ("WSAStartup failed");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -551,7 +551,7 @@ R_API bool r_socket_listen(RSocket *s, const char *port, const char *certfile) {
|
|||
#if __WINDOWS__
|
||||
WSADATA wsadata;
|
||||
if (WSAStartup (MAKEWORD (1, 1), &wsadata) == SOCKET_ERROR) {
|
||||
R_LOG_ERROR ("Error creating socket.");
|
||||
R_LOG_ERROR ("WSAStartup failed");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -254,8 +254,7 @@ R_API char *r_file_abspath_rel(const char *cwd, const char *file) {
|
|||
PTCHAR f = r_sys_conv_utf8_to_win (file);
|
||||
int s = GetFullPathName (f, MAX_PATH, abspath, NULL);
|
||||
if (s > MAX_PATH) {
|
||||
// R_LOG_ERROR ("r_file_abspath/GetFullPathName: Path to file too long.");
|
||||
eprintf ("r_file_abspath/GetFullPathName: Path to file too long.\n");
|
||||
eprintf ("r_file_abspath/GetFullPathName: Path to file too long\n");
|
||||
} else if (!s) {
|
||||
r_sys_perror ("r_file_abspath/GetFullPathName");
|
||||
} else {
|
||||
|
|
|
@ -21,7 +21,7 @@ int utf32len (ut32 *input) {
|
|||
|
||||
ut8 *utf32toutf8 (ut32 *input) {
|
||||
if (!input) {
|
||||
R_LOG_ERROR ("ERROR input is null");
|
||||
R_LOG_ERROR ("input is null");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,6 @@ ut8 *utf32toutf8 (ut32 *input) {
|
|||
int len = utf32len (input);
|
||||
ut8 *result = calloc (4, len + 1);
|
||||
if (!result) {
|
||||
R_LOG_ERROR ("ERROR: out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -54,7 +53,7 @@ ut8 *utf32toutf8 (ut32 *input) {
|
|||
result[j] = 0xf0 | ((input[i] >> 18) & 0x7);
|
||||
j += 4;
|
||||
} else {
|
||||
R_LOG_ERROR ("ERROR in toutf8. Seems like input is invalid");
|
||||
R_LOG_ERROR ("toutf8: invalid input");
|
||||
free (result);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -66,7 +65,6 @@ ut8 *utf32toutf8 (ut32 *input) {
|
|||
|
||||
ut32 *utf8toutf32 (const ut8 *input) {
|
||||
if (!input) {
|
||||
R_LOG_ERROR ("ERROR input is null");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -77,7 +75,6 @@ ut32 *utf8toutf32 (const ut8 *input) {
|
|||
ut32 *result = calloc (strlen ((const char *) input) + 1, 4);
|
||||
|
||||
if (!result) {
|
||||
R_LOG_ERROR ("ERROR: out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -101,7 +98,7 @@ ut32 *utf8toutf32 (const ut8 *input) {
|
|||
(input[i + 3] & 0x3f);
|
||||
i += 4;
|
||||
} else {
|
||||
R_LOG_ERROR ("ERROR in toutf32. Seems like input is invalid.");
|
||||
R_LOG_ERROR ("toutf32: invalid input");
|
||||
free (result);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -354,7 +351,7 @@ R_API char *r_punycode_decode(const char *src, int srclen, int *dstlen) {
|
|||
if (finaldst) {
|
||||
*dstlen = strlen ((const char *) finaldst);
|
||||
} else {
|
||||
R_LOG_ERROR ("ERROR: finaldst is null");
|
||||
R_LOG_ERROR ("finaldst can't be null");
|
||||
return NULL;
|
||||
}
|
||||
return (char *) finaldst;
|
||||
|
|
|
@ -1188,7 +1188,7 @@ R_API int r_str_unescape(char *buf) {
|
|||
err |= r_hex_to_byte (&ch, buf[i + 2]);
|
||||
err |= r_hex_to_byte (&ch2, buf[i + 3]);
|
||||
if (err) {
|
||||
R_LOG_ERROR ("Non-hexadecimal chars in input.");
|
||||
R_LOG_ERROR ("Non-hexadecimal chars in input");
|
||||
return 0; // -1?
|
||||
}
|
||||
buf[i] = (ch << 4) + ch2;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
(git grep '4d""' libr) && exit 1
|
||||
(git grep 'r_core_cmd' libr | grep -v /lang/ | grep '\\n') && exit 1
|
||||
(git grep 'r_str_startswith ("' libr ) && exit 1
|
||||
(git grep R_LOG | grep '\."' | grep -v sys/) && exit 1
|
||||
|
||||
# pending cleanups
|
||||
# git grep -e "`printf '\x09static'`" libr | grep -v R_TH_LOCAL|grep -v const | grep -v '(' && exit 1
|
||||
|
|
|
@ -5,7 +5,7 @@ e scr.interactive=false
|
|||
pd 1~..
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
ERROR: Internal less requires scr.interactive=true.
|
||||
ERROR: Internal less requires scr.interactive=true
|
||||
EOF
|
||||
RUN
|
||||
|
||||
|
@ -16,6 +16,6 @@ e scr.interactive=false
|
|||
pd 1~...
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
ERROR: Hud mode requires scr.interactive=true.
|
||||
ERROR: Hud mode requires scr.interactive=true
|
||||
EOF
|
||||
RUN
|
||||
|
|
Loading…
Reference in New Issue