summaryrefslogtreecommitdiff
path: root/src/vm/gdbjit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/gdbjit.cpp')
-rw-r--r--src/vm/gdbjit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vm/gdbjit.cpp b/src/vm/gdbjit.cpp
index 4d7640afed..2742946cd5 100644
--- a/src/vm/gdbjit.cpp
+++ b/src/vm/gdbjit.cpp
@@ -99,15 +99,20 @@ GetDebugInfoFromPDB(MethodDesc* MethodDescPtr, SymbolsInfo** symInfo, unsigned i
const Module* mod = MethodDescPtr->GetMethodTable()->GetModule();
SString modName = mod->GetFile()->GetPath();
+ if (modName.IsEmpty())
+ return E_FAIL;
+
StackScratchBuffer scratch;
const char* szModName = modName.GetUTF8(scratch);
MethodDebugInfo* methodDebugInfo = new (nothrow) MethodDebugInfo();
if (methodDebugInfo == nullptr)
return E_OUTOFMEMORY;
+
methodDebugInfo->points = (SequencePointInfo*) CoTaskMemAlloc(sizeof(SequencePointInfo) * numMap);
if (methodDebugInfo->points == nullptr)
return E_OUTOFMEMORY;
+
methodDebugInfo->size = numMap;
if (getInfoForMethodDelegate(szModName, MethodDescPtr->GetMemberDef(), *methodDebugInfo) == FALSE)