mirror of https://github.com/x64dbg/GleeBug
totally not hacky way of detecting duplicate step callbacks
This commit is contained in:
parent
841a99b5ee
commit
a006043c26
|
|
@ -76,6 +76,16 @@ namespace GleeBug
|
||||||
void ThreadInfo::StepInto(const StepCallback & cbStep)
|
void ThreadInfo::StepInto(const StepCallback & cbStep)
|
||||||
{
|
{
|
||||||
StepInto();
|
StepInto();
|
||||||
|
|
||||||
|
auto target = cbStep.target<void()>();
|
||||||
|
for (const auto & cb : stepCallbacks)
|
||||||
|
{
|
||||||
|
if (target == cb.target<void()>())
|
||||||
|
{
|
||||||
|
puts("duplicate StepInto callback detected!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
stepCallbacks.push_back(cbStep);
|
stepCallbacks.push_back(cbStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <unordered_set>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue