Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void ApplyUpdate(Assembly assembly, ReadOnlySpan<byte> metadataDel
/// <summary>
/// Returns the metadata update capabilities.
/// </summary>
internal static string GetCapabilities() => "Baseline AddMethodToExistingType AddStaticFieldToExistingType AddInstanceFieldToExistingType NewTypeDefinition ChangeCustomAttributes UpdateParameters GenericUpdateMethod GenericAddMethodToExistingType GenericAddFieldToExistingType";
internal static string GetCapabilities() => "Baseline AddMethodToExistingType AddStaticFieldToExistingType AddInstanceFieldToExistingType NewTypeDefinition ChangeCustomAttributes UpdateParameters GenericUpdateMethod GenericAddMethodToExistingType GenericAddFieldToExistingType AddFieldRva";

/// <summary>
/// Returns true if the apply assembly update is enabled and available.
Expand Down
3 changes: 1 addition & 2 deletions src/coreclr/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,7 @@ void DacDbiInterfaceImpl::ComputeFieldData(PTR_FieldDesc pFD,
if (pFD->IsRVA())
{
// RVA statics are relative to a base module address
DWORD offset = pFD->GetOffset();
PTR_VOID addr = pFD->GetModule()->GetRvaField(offset);
PTR_VOID addr = pFD->GetStaticAddressHandle(NULL);
if (pCurrentFieldData->OkToGetOrSetStaticAddress())
{
pCurrentFieldData->SetStaticAddress(PTR_TO_TADDR(addr));
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/debug/ee/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4268,7 +4268,7 @@ bool DebuggerController::DispatchNativeException(EXCEPTION_RECORD *pException,
CONTRACTL_END;

LOG((LF_CORDB, LL_EVERYTHING, "DispatchNativeException was called\n"));
LOG((LF_CORDB, LL_INFO10000, "Native exception at 0x%p, code=0x%8x, context=0x%p, er=0x%p\n",
LOG((LF_CORDB, LL_INFO10000, "Native exception at %p, code=0x%8x, context=%p, er=%p\n",
pException->ExceptionAddress, dwCode, pContext, pException));


Expand Down Expand Up @@ -4477,7 +4477,7 @@ bool DebuggerController::DispatchNativeException(EXCEPTION_RECORD *pException,
return FALSE;
}
pCurThread->SetThreadState(Thread::TS_SSToExitApcCallDone);
pCurThread->ResetThreadState(Thread::TS_SSToExitApcCall);
pCurThread->ResetThreadState(Thread::TS_SSToExitApcCall);
DebuggerController::UnapplyTraceFlag(pCurThread);
pCurThread->MarkForSuspensionAndWait(Thread::TS_DebugSuspendPending);
}
Expand Down Expand Up @@ -6061,7 +6061,7 @@ bool DebuggerStepper::TrapStep(ControllerStackInfo *info, bool in)
fCallingIntoFunclet = IsAddrWithinMethodIncludingFunclet(ji, info->m_activeFrame.md, walker.GetNextIP()) &&
((CORDB_ADDRESS)(SIZE_T)walker.GetNextIP() != ji->m_addrOfCode);
#endif
// If we are stepping into a tail call that uses the StoreTailCallArgs
// If we are stepping into a tail call that uses the StoreTailCallArgs
// we need to enable the method enter, otherwise it will behave like a resume
if (in && IsTailCall(walker.GetNextIP(), info, TailCallFunctionType::StoreTailCallArgs))
{
Expand Down Expand Up @@ -7600,9 +7600,9 @@ bool DebuggerStepper::TriggerSingleStep(Thread *thread, const BYTE *ip)
// Sometimes we can get here with a callstack that is coming from an APC
// this will disable the single stepping and incorrectly resume an app that the user
// is stepping through.
#ifdef FEATURE_THREAD_ACTIVATION
#ifdef FEATURE_THREAD_ACTIVATION
if ((thread->m_State & Thread::TS_DebugWillSync) == 0)
#endif
#endif // FEATURE_THREAD_ACTIVATION
{
DisableSingleStep();
}
Expand Down
31 changes: 30 additions & 1 deletion src/coreclr/vm/ceeload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ void Module::InitializeDynamicILCrst()
// Add a (token, address) pair to the table of IL blobs for reflection/dynamics
// Arguments:
// Input:
// token method token
// token method token or field token (See SetDynamicRvaField)
// blobAddress address of the start of the IL blob address, including the header
// Output: not explicit, but if the pair was not already in the table it will be added.
// Does not add duplicate tokens to the table.
Expand Down Expand Up @@ -932,6 +932,35 @@ TADDR Module::GetDynamicIL(mdToken token)
return entry.m_il;
}

#ifndef DACCESS_COMPILE
void Module::SetDynamicRvaField(mdToken token, TADDR blobAddress)
{
CONTRACTL
{
THROWS;
GC_NOTRIGGER;
MODE_COOPERATIVE;
}
CONTRACTL_END;

// Reuse existing dynamic IL mechanism to store/map the data.
SetDynamicIL(token, blobAddress);
}
#endif // !DACCESS_COMPILE

TADDR Module::GetDynamicRvaField(mdToken token)
{
CONTRACTL
{
NOTHROW;
GC_NOTRIGGER;
}
CONTRACTL_END

// Reuse existing dynamic IL mechanism to store/map the data.
return GetDynamicIL(token);
}

#if !defined(DACCESS_COMPILE)
//---------------------------------------------------------------------------------------
//
Expand Down
10 changes: 10 additions & 0 deletions src/coreclr/vm/ceeload.h
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,19 @@ class Module : public ModuleBase
void StartUnload();

public:
#ifndef DACCESS_COMPILE
void SetDynamicIL(mdToken token, TADDR blobAddress);
#endif // !DACCESS_COMPILE
TADDR GetDynamicIL(mdToken token);

protected:
#ifndef DACCESS_COMPILE
void SetDynamicRvaField(mdToken token, TADDR blobAddress);
#endif // !DACCESS_COMPILE

public:
TADDR GetDynamicRvaField(mdToken token);

// store and retrieve the instrumented IL offset mapping for a particular method
#if !defined(DACCESS_COMPILE)
void SetInstrumentedILOffsetMapping(mdMethodDef token, InstrumentedILOffsetMapping mapping);
Expand Down
Loading
Loading