fix arm32 db/cmd/cmd_open (#18052)

This commit is contained in:
Liumeo 2020-12-17 18:38:31 -05:00 committed by GitHub
parent 78cd6cf50b
commit 56cdc7c112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -36,11 +36,6 @@ static RBinInfo *info(RBinFile *bf) {
ret->has_pi = 0;
ret->has_canary = 0;
ret->has_retguard = -1;
if (R_SYS_BITS & R_SYS_BITS_64) {
ret->bits = 64;
} else {
ret->bits = 32;
}
ret->big_endian = 0;
ret->has_va = 0;
ret->has_nx = 0;

View File

@ -397,7 +397,7 @@ static int r_core_file_do_load_for_debug(RCore *r, ut64 baseaddr, const char *fi
binfile = r_bin_cur (r->bin);
r_core_bin_set_env (r, binfile);
plugin = r_bin_file_cur_plugin (binfile);
if (plugin && !strncmp (plugin->name, "any", 5)) {
if (plugin && !strcmp (plugin->name, "any")) {
// set use of raw strings
// r_config_set_i (r->config, "io.va", false);
//\\ r_config_set (r->config, "bin.rawstr", "true");
@ -407,7 +407,7 @@ static int r_core_file_do_load_for_debug(RCore *r, ut64 baseaddr, const char *fi
} else if (binfile) {
RBinObject *obj = r_bin_cur_object (r->bin);
RBinInfo *info = obj? obj->info: NULL;
if (plugin && strcmp (plugin->name, "any") && info) {
if (plugin && info) {
r_core_bin_set_arch_bits (r, binfile->file, info->arch, info->bits);
}
}
@ -450,6 +450,7 @@ static int r_core_file_do_load_for_io_plugin(RCore *r, ut64 baseaddr, ut64 loada
if (!info) {
return false;
}
info->bits = r->rasm->bits;
// set use of raw strings
r_core_bin_set_arch_bits (r, binfile->file, info->arch, info->bits);
// r_config_set_i (r->config, "io.va", false);
@ -463,7 +464,7 @@ static int r_core_file_do_load_for_io_plugin(RCore *r, ut64 baseaddr, ut64 loada
if (!info) {
return false;
}
if (plugin && strcmp (plugin->name, "any") && info) {
if (plugin) {
r_core_bin_set_arch_bits (r, binfile->file,
info->arch, info->bits);
}