MCPcopy Create free account
hub / github.com/beefytech/Beef / Debugger_OpenFile

Function Debugger_OpenFile

IDEHelper/DebugManager.cpp:757–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755}
756
757BF_EXPORT bool BF_CALLTYPE Debugger_OpenFile(const char* launchPath, const char* targetPath, const char* args, const char* workingDir, void* envBlockPtr, int envBlockSize, bool hotSwapEnabled, DbgOpenFileFlags openFileFlags)
758{
759 BF_ASSERT(gDebugger == NULL);
760
761 if (!FileExists(launchPath))
762 {
763 gDebugManager->mOutMessages.push_back(StrFormat("error Unable to locate specified launch target '%s'", launchPath));
764 return false;
765 }
766
767 DebuggerResult debuggerResult = DebuggerResult_Ok;
768 if ((gDebugManager->mDebugger64 != NULL) && (gDebugManager->mDebugger64->CanOpen(launchPath, &debuggerResult)))
769 gDebugger = gDebugManager->mDebugger64;
770 else
771 gDebugger = gDebugManager->mDebugger32;
772
773 if (gDebugger == NULL)
774 {
775 if (debuggerResult == DebuggerResult_WrongBitSize)
776 gDebugManager->mOutMessages.push_back(StrFormat("error The file 32-bit file '%s' cannot be debugged because 32-bit debugger has been disabled", launchPath));
777 return false;
778 }
779
780 Array<uint8> envBlock;
781 if (envBlockPtr != NULL)
782 {
783 if (envBlockSize != 0)
784 envBlock.Insert(0, (uint8*)envBlockPtr, envBlockSize);
785 }
786
787 gDebugger->OpenFile(launchPath, targetPath, args, workingDir, envBlock, hotSwapEnabled, openFileFlags);
788 return true;
789}
790
791BF_EXPORT bool BF_CALLTYPE Debugger_ComptimeAttach(void* bfCompiler)
792{

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.45
CanOpenMethod · 0.45
InsertMethod · 0.45
OpenFileMethod · 0.45

Tested by

no test coverage detected