Fix #5634: Use 32 bit calling convention for ARM Thumb

This commit is contained in:
Akihiko Odaki 2016-08-29 18:39:50 +09:00 committed by radare
parent dbfd630927
commit 2a64686981

View File

@ -467,8 +467,13 @@ R_API void r_core_anal_type_init(RCore *core) {
R_API void r_core_anal_cc_init(RCore *core) {
sdb_reset ( core->anal->sdb_cc);
const char *anal_arch = r_config_get (core->config, "anal.arch");
char *dbpath = sdb_fmt (-1, DBSPATH"/cc-%s-%d.sdb", anal_arch,
r_config_get_i (core->config, "asm.bits"));
int bits = core->anal->bits;
if (bits == 16 && !strcmp (anal_arch, "arm")) {
bits = 32;
}
char *dbpath = sdb_fmt (-1, DBSPATH"/cc-%s-%d.sdb", anal_arch, bits);
if (r_file_exists (dbpath)) {
sdb_concat_by_path (core->anal->sdb_cc, dbpath);
}