mirror of
https://github.com/radareorg/r2ghidra.git
synced 2026-11-07 06:25:57 -10:00
Fix SleighAsm reinit for changed IO handles
This commit is contained in:
1 parent
a009034cb3
commit
e358ae348b
2 files changed
+3
-1
No files matched your search
+2
-1
@@ -22,7 +22,7 @@ void SleighAsm::init(const char *cpu, int bits, bool bigendian, RIO *io, RConfig
|
||||
collectSpecfiles ();
|
||||
}
|
||||
std::string new_sleigh_id = SleighIdFromSleighAsmConfig (Gcore, cpu, bits, bigendian, description);
|
||||
if (!sleigh_id.empty() && sleigh_id == new_sleigh_id) {
|
||||
if (!sleigh_id.empty() && sleigh_id == new_sleigh_id && current_io == io) {
|
||||
return;
|
||||
}
|
||||
initInner (io, new_sleigh_id);
|
||||
@@ -51,6 +51,7 @@ void SleighAsm::initInner(RIO *io, std::string sleigh_id) {
|
||||
trans.clearCache ();
|
||||
initRegMapping ();
|
||||
this->sleigh_id = sleigh_id;
|
||||
current_io = io;
|
||||
}
|
||||
|
||||
static void parseProto(const Element *el, std::vector<std::string> &arg_names, std::vector<std::string> &ret_names) {
|
||||
|
||||
@@ -190,6 +190,7 @@ class R2Sleigh;
|
||||
class SleighAsm {
|
||||
private:
|
||||
AsmLoadImage loader;
|
||||
RIO *current_io = nullptr;
|
||||
ContextInternal context;
|
||||
DocumentStorage docstorage;
|
||||
FileManage specpaths;
|
||||
|
||||
Reference in new issue
Block a user