Skip to content

Commit

Permalink
Add some notes to why __debugbreak's are triggering
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen committed Jun 24, 2022
1 parent 4a17d40 commit 5653477
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/common/dllInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export extern "C" BOOL InterceptEntryPoint(HINSTANCE const instance,

if (!hLoadedLibrary) {
Util::BreakToDebuggerIfPresent(); // No host?! Bad
return false;
}

auto& hostDllInterface = *reinterpret_cast<const DllInterface*>(GetProcAddress(hLoadedLibrary, MAKEINTRESOURCEA(1)));
Expand Down
9 changes: 5 additions & 4 deletions src/common/enfusionTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class FunctionResultHandler {
if (VerifyType<Type>()) {
getHelper().SetAs<Type>(value);
} else
__debugbreak();
__debugbreak(); // You passed a invalid type, the variable stored here is not the type you are trying to set it ass
};

bool IsNull() const {
Expand Down Expand Up @@ -297,7 +297,7 @@ export class FunctionArgumentsHandler {
if (VerifyType<Type>(index)) {
getHelper(index).SetAs<Type>(value);
} else
__debugbreak();
__debugbreak(); // You passed a invalid type, the variable stored here is not the type you are trying to set it ass
};

bool IsNull(uint32_t index) const {
Expand Down Expand Up @@ -345,7 +345,7 @@ export class ClassInstanceVariable {
if (VerifyType<Type>()) {
getHelper()->SetAs<Type>(value);
} else
__debugbreak();
__debugbreak(); // You passed a invalid type, the variable stored here is not the type you are trying to set it ass
};

template <typename Type>
Expand Down Expand Up @@ -476,7 +476,8 @@ class IScriptClassBaseSimple {

virtual ~IScriptClassBaseSimple() {
// UnRegister
__debugbreak(); // Cannot do that currently
Util::BreakToDebuggerIfPresent();
//__debugbreak(); // Cannot do that currently
//GDllInterface.regClass(this, {}, false);
}

Expand Down
2 changes: 1 addition & 1 deletion src/host
Submodule host updated from 73547e to 6ef86b

0 comments on commit 5653477

Please sign in to comment.