diff --git a/libr/core/cbin.c b/libr/core/cbin.c index fbebd0b05c..b69bf926ca 100644 --- a/libr/core/cbin.c +++ b/libr/core/cbin.c @@ -815,9 +815,8 @@ static int bin_dwarf(RCore *core, int mode) { } // TODO: implement internal : if ((mode & R_CORE_BIN_SET)) if ((mode & R_CORE_BIN_SET)) { - char *cmt = r_str_newf ("%s:%d %s", row->file, row->line, line?line:""); - r_meta_set_string (core->anal, R_META_TYPE_COMMENT, - row->address, cmt); + char *cmt = r_str_newf ("%s:%d %s", row->file, (int)row->line, line? line: ""); + r_meta_set_string (core->anal, R_META_TYPE_COMMENT, row->address, cmt); free (cmt); } else { r_cons_printf ("\"CC %s:%d %s\"@0x%"PFMT64x"\n", diff --git a/libr/core/config.c b/libr/core/config.c index 5ad40e5a7d..8fe885bfd9 100644 --- a/libr/core/config.c +++ b/libr/core/config.c @@ -267,6 +267,21 @@ static int cb_asmarch(void *user, void *data) { eprintf ("asm.arch: cannot find (%s)\n", node->value); return false; } + if (core->assembler->cur) { + const char *newAsmCPU = core->assembler->cur->cpus; + if (newAsmCPU) { + if (*newAsmCPU) { + char *nac = strdup (newAsmCPU); + char *comma = strchr (nac, ','); + if (comma) { + *comma = 0; + r_config_set (core->config, "asm.cpu", nac); + } + } else { + r_config_set (core->config, "asm.cpu", ""); + } + } + } if (core->assembler && core->assembler->cur) { bits = core->assembler->cur->bits; if (8 & bits) {