Skip to content

Commit c8c0790

Browse files
authored
Drop support for IID_ICorDebugProcess10 and fix thread suspend logic (#44549)
* Stop providing IID_ICorDebugProcess10 Prevent older VS versions from setting managed data breakpoints. * Simplify the thread collision logic to prevent deadlock This is a simplification of #44539 as proposed by @kouvel
1 parent 905a367 commit c8c0790

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

src/coreclr/src/debug/di/process.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -2169,10 +2169,6 @@ HRESULT CordbProcess::QueryInterface(REFIID id, void **pInterface)
21692169
{
21702170
*pInterface = static_cast<ICorDebugProcess8*>(this);
21712171
}
2172-
else if (id == IID_ICorDebugProcess10)
2173-
{
2174-
*pInterface = static_cast<ICorDebugProcess10*>(this);
2175-
}
21762172
else if (id == IID_ICorDebugProcess11)
21772173
{
21782174
*pInterface = static_cast<ICorDebugProcess11*>(this);

src/coreclr/src/debug/di/rspriv.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -2929,7 +2929,6 @@ class CordbProcess :
29292929
public ICorDebugProcess5,
29302930
public ICorDebugProcess7,
29312931
public ICorDebugProcess8,
2932-
public ICorDebugProcess10,
29332932
public ICorDebugProcess11,
29342933
public IDacDbiInterface::IAllocator,
29352934
public IDacDbiInterface::IMetaDataLookup,
@@ -3140,7 +3139,7 @@ class CordbProcess :
31403139
COM_METHOD EnableExceptionCallbacksOutsideOfMyCode(BOOL enableExceptionsOutsideOfJMC);
31413140

31423141
//-----------------------------------------------------------
3143-
// ICorDebugProcess10
3142+
// ICorDebugProcess10 (To be removed in .NET 6, in a separate cleanup PR)
31443143
//-----------------------------------------------------------
31453144
COM_METHOD EnableGCNotificationEvents(BOOL fEnable);
31463145

src/coreclr/src/vm/threadsuspend.cpp

+1-10
Original file line numberDiff line numberDiff line change
@@ -5943,16 +5943,7 @@ void ThreadSuspend::SuspendEE(SUSPEND_REASON reason)
59435943
// that there is a thread which appears to be stopped at a gc
59445944
// safe point, but which really is not. If that is the case,
59455945
// back off and try again.
5946-
//
5947-
// When the debugger is synchronizing, trying to perform a GC could deadlock. The GC has the
5948-
// threadstore lock and synchronization cannot complete until the debugger can get the
5949-
// threadstore lock. However the GC can not complete until it sends the BeforeGarbageCollection
5950-
// event, and the event can not be sent until the debugger is synchronized. In order to break
5951-
// this deadlock cycle the GC must give up the threadstore lock, allow the debugger to synchronize,
5952-
// then try again.
5953-
//
5954-
|| (CORDebuggerAttached() &&
5955-
(g_pDebugInterface->ThreadsAtUnsafePlaces() || g_pDebugInterface->IsSynchronizing()))
5946+
|| (CORDebuggerAttached() && g_pDebugInterface->ThreadsAtUnsafePlaces())
59565947
#endif // DEBUGGING_SUPPORTED
59575948
)
59585949
{

0 commit comments

Comments
 (0)