diff --git a/GleeBug/Debugger.Thread.cpp b/GleeBug/Debugger.Thread.cpp index f05d445..e68db0b 100644 --- a/GleeBug/Debugger.Thread.cpp +++ b/GleeBug/Debugger.Thread.cpp @@ -76,6 +76,16 @@ namespace GleeBug void ThreadInfo::StepInto(const StepCallback & cbStep) { StepInto(); + + auto target = cbStep.target(); + for (const auto & cb : stepCallbacks) + { + if (target == cb.target()) + { + puts("duplicate StepInto callback detected!"); + return; + } + } stepCallbacks.push_back(cbStep); } diff --git a/GleeBug/GleeBug.h b/GleeBug/GleeBug.h index 6cbd9c6..c4faa4e 100644 --- a/GleeBug/GleeBug.h +++ b/GleeBug/GleeBug.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include