Skip to content

Commit

Permalink
Add basic adapter for gb
Browse files Browse the repository at this point in the history
  • Loading branch information
thestr4ng3r committed Aug 20, 2023
1 parent c9c4d07 commit f949696
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bap-frames
15 changes: 12 additions & 3 deletions rz-tracetest/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class PPCTraceAdapter : public TraceAdapter {
return false;
}

bool IgnoreUnknownReg(const std::string &rz_reg_name) const {
bool IgnoreUnknownReg(const std::string &rz_reg_name) const override {
return rz_reg_name == "ca32" || rz_reg_name == "ov32";
}

Expand Down Expand Up @@ -261,7 +261,7 @@ class I8051TraceAdapter : public TraceAdapter {
return false;
}

bool IgnoreUnknownReg(const std::string &rz_reg_name) const {
bool IgnoreUnknownReg(const std::string &rz_reg_name) const override {
return true;
}
};
Expand All @@ -280,11 +280,18 @@ class MipsTraceAdapter : public TraceAdapter {
return false;
}

bool IgnoreUnknownReg(const std::string &rz_reg_name) const {
bool IgnoreUnknownReg(const std::string &rz_reg_name) const override {
return true;
}
};

class GBTraceAdapter : public TraceAdapter {
public:
std::string RizinArch() const override {
return "gb";
}
};

std::unique_ptr<TraceAdapter> SelectTraceAdapter(frame_architecture arch) {
switch (arch) {
case frame_arch_6502:
Expand All @@ -299,6 +306,8 @@ std::unique_ptr<TraceAdapter> SelectTraceAdapter(frame_architecture arch) {
return std::unique_ptr<TraceAdapter>(new I8051TraceAdapter());
case frame_arch_mips:
return std::unique_ptr<TraceAdapter>(new MipsTraceAdapter());
case frame_arch_sm83:
return std::unique_ptr<TraceAdapter>(new GBTraceAdapter());
default:
return nullptr;
}
Expand Down

0 comments on commit f949696

Please sign in to comment.