mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 07:30:33 +00:00
Update asm.cpu after asm.arch
This commit is contained in:
parent
c7fa3429a1
commit
3e3f098413
@ -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",
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user