aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/executioner.h
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-01-26 02:15:38 +0000
committerbloodstalker <thabogre@gmail.com>2018-01-26 02:15:38 +0000
commitc5bba9ae8121d250284ecd1ce69ffe344f04fea8 (patch)
tree73406f955ac06644b24678858f8df7f11bc31896 /bruiser/executioner.h
parentsome tests for the ffi funcitonality on bruiuser (diff)
downloadmutator-c5bba9ae8121d250284ecd1ce69ffe344f04fea8.tar.gz
mutator-c5bba9ae8121d250284ecd1ce69ffe344f04fea8.zip
fixed string type for xobjs, also xcall can now call functions by name as well
Diffstat (limited to '')
-rw-r--r--bruiser/executioner.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bruiser/executioner.h b/bruiser/executioner.h
index 5c04be1..4793915 100644
--- a/bruiser/executioner.h
+++ b/bruiser/executioner.h
@@ -235,6 +235,12 @@ class Executioner {
}
return std::make_pair(nullptr, "");
}
+ std::pair<void*, std::string> getvptrbyname(const char* name) {
+ for (auto &iter : vptrs) {
+ if (std::strcmp(name, iter.second.c_str()) == 0) return iter;
+ }
+ return std::make_pair(nullptr, "");
+ }
private:
std::vector<std::pair<void*, size_t>> obj_mem_ptrs;
@@ -328,6 +334,7 @@ class XGlobals {
XGlobals() {}
~XGlobals() {}
private:
+ std::list<std::pair<void*, size_t>> globals;
};
/**********************************************************************************************************************/
/**********************************************************************************************************************/