Automatically set the debug plugin when opening debug uris (#15403) ##io

This commit is contained in:
yossizap 2019-11-05 01:55:41 +00:00 committed by radare
parent a4d79c21c7
commit c233bf3584

View File

@ -907,6 +907,14 @@ R_API RCoreFile *r_core_file_open(RCore *r, const char *file, int flags, ut64 lo
swstep = false;
}
r_config_set_i (r->config, "dbg.swstep", swstep);
// Set the correct debug handle
if (fd->plugin && fd->plugin->isdbg) {
char *dh = r_str_ndup (file, (strstr (file, "://") - file));
if (dh) {
r_debug_use (r->dbg, dh);
free (dh);
}
}
}
//used by r_core_bin_load otherwise won't load correctly
//this should be argument of r_core_bin_load <shrug>