Skip to content
Snippets Groups Projects
Commit b71af63f authored by whh8b's avatar whh8b
Browse files

Debug support for plugins to plop instructions.

parent 35decce9
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,8 @@
namespace Zipr_SDK
{
class DollopManager_t;
class Placeable_t {
public:
Placeable_t() : m_is_placed(false), m_placed_address(0) {}
......@@ -86,16 +88,20 @@ class DollopEntry_t : public Placeable_t {
class Dollop_t : public Placeable_t, public std::list<DollopEntry_t*> {
public:
static Dollop_t *CreateNewDollop(libIRDB::Instruction_t *start);
static Dollop_t *CreateNewDollop(libIRDB::Instruction_t *start,
DollopManager_t *mgr = NULL);
Dollop_t(libIRDB::Instruction_t *start);
Dollop_t(libIRDB::Instruction_t *start, DollopManager_t *);
Dollop_t() :
m_size(0),
m_fallthrough_dollop(NULL),
m_fallback_dollop(NULL),
m_fallthrough_patched(false),
m_coalesced(false),
m_was_truncated(false) {}
m_was_truncated(false),
m_dollop_mgr(NULL) {}
void SetDollopManager(DollopManager_t *mgr) { m_dollop_mgr = mgr; }
size_t GetSize() const {
return m_size;
......@@ -141,6 +147,7 @@ class Dollop_t : public Placeable_t, public std::list<DollopEntry_t*> {
bool m_fallthrough_patched;
bool m_coalesced;
bool m_was_truncated;
DollopManager_t *m_dollop_mgr;
};
}
#endif
......@@ -50,6 +50,8 @@ class DollopManager_t {
public:
DollopManager_t() {};
virtual int DetermineWorstCaseInsnSize(libIRDB::Instruction_t *insn)=0;
/*
* Add a dollop and all its fallthrough dollops
* to the dollop manager.
......
......@@ -49,6 +49,7 @@ class Zipr_t
* These are public functions that the SDK user way want to use.
*/
virtual int DetermineWorstCaseInsnSize(libIRDB::Instruction_t*, bool account_for_jump = true) = 0;
virtual int PluginDetermineWorstCaseInsnSize(libIRDB::Instruction_t*, bool account_for_jump = true) = 0;
virtual Zipr_SDK::RangeAddress_t PlopDollopEntry(
DollopEntry_t *,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment