mirror of
https://github.com/rizinorg/rz-tracetest.git
synced 2026-11-07 06:55:58 -10:00
Add tricore adapter
This commit is contained in:
1 parent
e4dc2e9c43
commit
f0a40ba650
3 files changed
+25
-2
No files matched your search
+2
-1
@@ -1,3 +1,4 @@
|
||||
[submodule "bap-frames"]
|
||||
path = bap-frames
|
||||
url = https://github.com/BinaryAnalysisPlatform/bap-frames.git
|
||||
url = https://github.com/b1llow/bap-frames.git
|
||||
branch = tricore-support
|
||||
+1
-1
Submodule bap-frames updated: 75878683e9...821c2b6cd0.
@@ -736,6 +736,26 @@ class X86TraceAdapter : public TraceAdapter {
|
||||
}
|
||||
};
|
||||
|
||||
class TriCoreTraceAdapter : public TraceAdapter {
|
||||
std::string RizinArch() const override {
|
||||
return "tricore";
|
||||
}
|
||||
|
||||
int RizinBits(std::optional<std::string> mode, std::optional<uint64_t> machine) const override {
|
||||
return 32;
|
||||
}
|
||||
|
||||
bool IgnorePCMismatch(ut64 pc_actual, ut64 pc_expect) const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual std::string TraceRegToRizin(const std::string &tracereg) const override {
|
||||
std::string r = tracereg;
|
||||
std::transform(r.begin(), r.end(), r.begin(), ::tolower);
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<TraceAdapter> SelectTraceAdapter(frame_architecture arch, size_t mach) {
|
||||
switch (arch) {
|
||||
case frame_arch_6502:
|
||||
@@ -756,6 +776,8 @@ std::unique_ptr<TraceAdapter> SelectTraceAdapter(frame_architecture arch, size_t
|
||||
return std::unique_ptr<TraceAdapter>(new HexagonTraceAdapter());
|
||||
case frame_arch_i386:
|
||||
return std::unique_ptr<TraceAdapter>(new X86TraceAdapter());
|
||||
case frame_arch_tricore:
|
||||
return std::unique_ptr<TraceAdapter>(new TriCoreTraceAdapter());
|
||||
case frame_arch_sparc: {
|
||||
std::unique_ptr<TraceAdapter> adapter;
|
||||
if (frame_mach_sparc_64bit_p(mach) != 0) {
|
||||
|
||||
Reference in new issue
Block a user