diff --git a/src/ArchMap.cpp b/src/ArchMap.cpp index 3157f460..b3984c5d 100644 --- a/src/ArchMap.cpp +++ b/src/ArchMap.cpp @@ -129,6 +129,8 @@ static const std::map arch_map = { CUSTOM_BITS((RzCore *core) { return 32; })}}, + + { "tricore", { "tricore" } }, }; static const std::map compiler_map = { @@ -185,7 +187,7 @@ RZ_API std::string SleighIdFromSleighAsmConfig(const char *cpu, int bits, bool b auto proc = lang.getProcessor(); if(StrToLower(proc) == low_cpu) { - return proc + return proc + ":" + (bigendian ? "BE" : "LE") + ":" + to_string(bits) + ":" + "default"; diff --git a/src/RizinTypeFactory.cpp b/src/RizinTypeFactory.cpp index e7478dd5..1801489f 100644 --- a/src/RizinTypeFactory.cpp +++ b/src/RizinTypeFactory.cpp @@ -269,7 +269,9 @@ Datatype *RizinTypeFactory::fromRzTypeInternal(const RzType *ctype, string *erro { RzCoreLock core(arch->getCore()); char *tstr = rz_type_as_string(core->analysis->typedb, ctype); - *error = std::string("Failed to get any calling convention for callable ") + tstr; + if (error) { + *error = std::string("Failed to get any calling convention for callable ") + tstr; + } rz_mem_free(tstr); return nullptr; }