Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix issue with GDBJIT: moving NotifyGdb call to other function
This commit moves call to NotifyGdb::MethodPrepared from
MethodDesc::PrepareInitialCode to MethodDesc::PrepareCode.

Previously NotifyGdb::MethodPrepared might be not called
in few cases.

This commit fixes #33962.
  • Loading branch information
0xfk0 committed Mar 23, 2020
commit c3ecb4a019e36a1b1fcc36c259ed333ba1be5ec9
16 changes: 8 additions & 8 deletions src/coreclr/src/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,7 @@ PCODE MethodDesc::PrepareInitialCode(CallerGCMode callerGCMode)
STANDARD_VM_CONTRACT;
PrepareCodeConfig config(NativeCodeVersion(this), TRUE, TRUE);
config.SetCallerGCMode(callerGCMode);
PCODE pCode = PrepareCode(&config);

#if defined(FEATURE_GDBJIT) && defined(TARGET_UNIX) && !defined(CROSSGEN_COMPILE)
NotifyGdb::MethodPrepared(this);
#endif

return pCode;
return PrepareCode(&config);
}

PCODE MethodDesc::PrepareCode(PrepareCodeConfig* pConfig)
Expand All @@ -335,7 +329,13 @@ PCODE MethodDesc::PrepareCode(PrepareCodeConfig* pConfig)
// If other kinds of code need multi-versioning we could add more cases here,
// but for now generation of all other code/stubs occurs in other code paths
_ASSERTE(IsIL() || IsNoMetadata());
return PrepareILBasedCode(pConfig);
PCODE pCode = PrepareILBasedCode(pConfig);

#if defined(FEATURE_GDBJIT) && defined(TARGET_UNIX) && !defined(CROSSGEN_COMPILE)
NotifyGdb::MethodPrepared(this);
#endif

return pCode;
}

bool MayUsePrecompiledILStub()
Expand Down