mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-25 23:34:57 +00:00
Fix gcc8 warnings and rename core/asm.c to casm.c ##refactor
This commit is contained in:
parent
734b3d73ba
commit
e7d3706b8f
@ -8,7 +8,7 @@ DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto
|
||||
|
||||
OBJS=core.o cmd.o cfile.o cconfig.o visual.o cio.o yank.o libs.o graph.o
|
||||
OBJS+=fortune.o hack.o vasm.o patch.o cbin.o log.o rtr.o cmd_api.o
|
||||
OBJS+=carg.o canal.o project.o gdiff.o asm.o vmenus.o disasm.o plugin.o
|
||||
OBJS+=carg.o canal.o project.o gdiff.o casm.o vmenus.o disasm.o plugin.o
|
||||
OBJS+=task.o panels.o pseudo.o vmarks.o anal_tp.o blaze.o cundo.o
|
||||
|
||||
CFLAGS+=-I../../shlr/heap/include
|
||||
|
@ -73,7 +73,7 @@ R_API RList *r_core_asm_strsearch(RCore *core, const char *input, ut64 from, ut6
|
||||
int align = core->search->align;
|
||||
RRegex* rx = NULL;
|
||||
char *tok, *tokens[1024], *code = NULL, *ptr;
|
||||
int idx, tidx = 0, len;
|
||||
int idx, tidx = 0, len = 0;
|
||||
int tokcount, matchcount, count = 0;
|
||||
int matches = 0;
|
||||
const int addrbytes = core->io->addrbytes;
|
@ -1891,7 +1891,7 @@ static int bin_symbols_internal(RCore *r, int mode, ut64 laddr, int va, ut64 at,
|
||||
r_list_foreach (symbols, iter, symbol) {
|
||||
ut64 addr = symbol->paddr == UT64_MAX ? symbol->vaddr : rva (r->bin, symbol->paddr, symbol->vaddr, va);
|
||||
int len = symbol->size ? symbol->size : 32;
|
||||
SymName sn;
|
||||
SymName sn = {0};
|
||||
|
||||
if (exponly && !isAnExport (symbol)) {
|
||||
continue;
|
||||
|
@ -1454,7 +1454,8 @@ static struct autocomplete_flag_map_t {
|
||||
{ "$macro", NULL, R_CORE_AUTOCMPLT_MACR },
|
||||
{ "$file", "hints file paths", R_CORE_AUTOCMPLT_FILE },
|
||||
{ "$thme", "shows known themes hints", R_CORE_AUTOCMPLT_THME },
|
||||
{ "$optn", "allows the selection for multiple options", R_CORE_AUTOCMPLT_OPTN }
|
||||
{ "$optn", "allows the selection for multiple options", R_CORE_AUTOCMPLT_OPTN },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
static inline void print_dict(RCoreAutocomplete* a, int sub) {
|
||||
|
@ -3883,7 +3883,7 @@ static bool cmd_dcu (RCore *core, const char *input) {
|
||||
unsigned long steps = 0;
|
||||
long level = 0;
|
||||
const char *pc_name = core->dbg->reg->name[R_REG_NAME_PC];
|
||||
ut64 prev_pc;
|
||||
ut64 prev_pc = UT64_MAX;
|
||||
bool prev_call = false;
|
||||
bool prev_ret = false;
|
||||
const char *sp_name = core->dbg->reg->name[R_REG_NAME_SP];
|
||||
|
@ -2517,7 +2517,6 @@ static int prompt_flag (RCore *r, char *s, size_t maxlen) {
|
||||
if (!f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f->offset < r->offset) {
|
||||
snprintf (s, maxlen, "%s + %" PFMT64u, f->name, r->offset - f->offset);
|
||||
} else {
|
||||
@ -2535,7 +2534,8 @@ static void prompt_sec(RCore *r, char *s, size_t maxlen) {
|
||||
if (!sec) {
|
||||
return;
|
||||
}
|
||||
snprintf (s, maxlen, "%s:", sec->name);
|
||||
r_str_ncpy (s, sec->name, maxlen - 2);
|
||||
strcat (s, ":");
|
||||
}
|
||||
|
||||
static void chop_prompt (const char *filename, char *tmp, size_t max_tmp_size) {
|
||||
|
@ -1948,7 +1948,7 @@ static void ds_show_flags(RDisasmState *ds) {
|
||||
}
|
||||
RCore *core = ds->core;
|
||||
char addr[64];
|
||||
ut64 switch_addr;
|
||||
ut64 switch_addr = UT64_MAX;
|
||||
int case_start = -1, case_prev = 0, case_current = 0;
|
||||
f = fcnIn (ds, ds->at, R_ANAL_FCN_TYPE_NULL);
|
||||
const RList *flaglist = r_flag_get_list (core->flags, ds->at);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare2 - LGPL - Copyright 2016-2017 - n4x0r, soez, pancake */
|
||||
/* radare2 - LGPL - Copyright 2016-2018 - n4x0r, soez, pancake */
|
||||
|
||||
#ifndef INCLUDE_HEAP_GLIBC_C
|
||||
#define INCLUDE_HEAP_GLIBC_C
|
||||
@ -25,17 +25,17 @@ static void GH(update_arena_with_tc)(GH(RHeap_MallocState_tcache) *cmain_arena,
|
||||
int i = 0;
|
||||
main_arena->mutex = cmain_arena->mutex;
|
||||
main_arena->flags = cmain_arena->flags;
|
||||
for (i = 0; i <= BINMAPSIZE; i++ ) {
|
||||
for (i = 0; i < BINMAPSIZE; i++) {
|
||||
main_arena->binmap[i] = cmain_arena->binmap[i];
|
||||
}
|
||||
main_arena->have_fast_chunks = cmain_arena->have_fast_chunks;
|
||||
main_arena->attached_threads = cmain_arena->attached_threads;
|
||||
for (i = 0; i <= NFASTBINS; i++) {
|
||||
for (i = 0; i < NFASTBINS; i++) {
|
||||
main_arena->GH(fastbinsY)[i] = cmain_arena->fastbinsY[i];
|
||||
}
|
||||
main_arena->GH(top) = cmain_arena->top;
|
||||
main_arena->GH(last_remainder) = cmain_arena->last_remainder;
|
||||
for (i = 0; i <= NBINS * 2 - 2; i++) {
|
||||
for (i = 0; i < NBINS * 2 - 2; i++) {
|
||||
main_arena->GH(bins)[i] = cmain_arena->bins[i];
|
||||
}
|
||||
main_arena->GH(next) = cmain_arena->next;
|
||||
@ -48,16 +48,16 @@ static void GH(update_arena_without_tc)(GH(RHeap_MallocState) *cmain_arena, Mall
|
||||
int i = 0;
|
||||
main_arena->mutex = cmain_arena->mutex;
|
||||
main_arena->flags = cmain_arena->flags;
|
||||
for (i = 0; i <= BINMAPSIZE; i++ ) {
|
||||
for (i = 0; i < BINMAPSIZE; i++ ) {
|
||||
main_arena->binmap[i] = cmain_arena->binmap[i];
|
||||
}
|
||||
main_arena->attached_threads = 1;
|
||||
for (i = 0; i <= NFASTBINS; i++) {
|
||||
for (i = 0; i < NFASTBINS; i++) {
|
||||
main_arena->GH(fastbinsY)[i] = cmain_arena->fastbinsY[i];
|
||||
}
|
||||
main_arena->GH(top) = cmain_arena->top;
|
||||
main_arena->GH(last_remainder) = cmain_arena->last_remainder;
|
||||
for (i = 0; i <= NBINS * 2 - 2; i++) {
|
||||
for (i = 0; i < NBINS * 2 - 2; i++) {
|
||||
main_arena->GH(bins)[i] = cmain_arena->bins[i];
|
||||
}
|
||||
main_arena->GH(next) = cmain_arena->next;
|
||||
@ -159,7 +159,7 @@ static void GH(print_arena_stats)(RCore *core, GHT m_arena, MallocState *main_ar
|
||||
PRINT_GA (" fastbinsY = {\n");
|
||||
|
||||
for (i = 0, j = 1, k = SZ * 4; i < NFASTBINS; i++, j++, k += SZ * 2) {
|
||||
if (FASTBIN_IDX_TO_SIZE(j) <= global_max_fast) {
|
||||
if (FASTBIN_IDX_TO_SIZE (j) <= global_max_fast) {
|
||||
PRINTF_YA (" Fastbin %02d\n", j);
|
||||
} else {
|
||||
PRINTF_RA (" Fastbin %02d\n", j);
|
||||
@ -266,7 +266,7 @@ static bool GH(r_resolve_main_arena)(RCore *core, GHT *m_arena) {
|
||||
}
|
||||
|
||||
GHT brk_start = GHT_MAX, brk_end = GHT_MAX;
|
||||
GHT libc_addr_sta = GHT_MAX, libc_addr_end;
|
||||
GHT libc_addr_sta = GHT_MAX, libc_addr_end = 0;
|
||||
GHT addr_srch = GHT_MAX, heap_sz = GHT_MAX;
|
||||
|
||||
if (!r_config_get_i (core->config, "cfg.debug")) {
|
||||
@ -309,7 +309,7 @@ static bool GH(r_resolve_main_arena)(RCore *core, GHT *m_arena) {
|
||||
if (!ta) {
|
||||
return false;
|
||||
}
|
||||
while ( addr_srch < libc_addr_end ) {
|
||||
while (addr_srch < libc_addr_end) {
|
||||
GH (update_main_arena) (core, addr_srch, ta);
|
||||
if ( ta->GH(top) > brk_start && ta->GH(top) < brk_end &&
|
||||
ta->GH(system_mem) == heap_sz) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
files = [
|
||||
'anal_tp.c',
|
||||
'asm.c',
|
||||
'casm.c',
|
||||
'blaze.c',
|
||||
'canal.c',
|
||||
'carg.c',
|
||||
|
Loading…
x
Reference in New Issue
Block a user