@@ -11582,54 +11582,6 @@ void CordbProcess::HandleSyncCompleteRecieved()
11582
11582
11583
11583
#ifdef FEATURE_INTEROP_DEBUGGING
11584
11584
11585
- // Get a Thread's _user_ starting address (the real starting address may be some
11586
- // OS shim.)
11587
- // This may return NULL for the Async-Break thread.
11588
- void* GetThreadUserStartAddr(const DEBUG_EVENT* pCreateThreadEvent)
11589
- {
11590
- // On Win7 and above, we can trust the lpStartAddress field of the CREATE_THREAD_DEBUG_EVENT
11591
- // to be the user start address (the actual OS start address is an implementation detail that
11592
- // doesn't need to be exposed to users). Note that we are assuming that the target process
11593
- // is running on Win7 if mscordbi is. If we ever have some remoting scenario where the target
11594
- // can run on a different windows machine with a different OS version we will need a way to
11595
- // determine the target's OS version
11596
- if(RunningOnWin7())
11597
- {
11598
- return pCreateThreadEvent->u.CreateThread.lpStartAddress;
11599
- }
11600
-
11601
- // On pre-Win7 OSes, we rely on an OS implementation detail to get the real user thread start:
11602
- // it exists in EAX at thread start time.
11603
- // Note that for a brief period of time there was a GetThreadStartInformation API in Longhorn
11604
- // we could use for this, but it was removed during the Longhorn reset.
11605
- HANDLE hThread = pCreateThreadEvent->u.CreateThread.hThread;
11606
- #if defined(DBG_TARGET_X86)
11607
- // Grab the thread's context.
11608
- DT_CONTEXT c;
11609
- c.ContextFlags = DT_CONTEXT_FULL;
11610
- BOOL succ = DbiGetThreadContext(hThread, &c);
11611
-
11612
- if (succ)
11613
- {
11614
- return (void*) c.Eax;
11615
- }
11616
- #elif defined(DBG_TARGET_AMD64)
11617
- DT_CONTEXT c;
11618
- c.ContextFlags = DT_CONTEXT_FULL;
11619
- BOOL succ = DbiGetThreadContext(hThread, &c);
11620
-
11621
- if (succ)
11622
- {
11623
- return (void*) c.Rcx;
11624
- }
11625
- #else
11626
- PORTABILITY_ASSERT("port GetThreadUserStartAddr");
11627
- #endif
11628
-
11629
- return NULL;
11630
- }
11631
-
11632
-
11633
11585
//---------------------------------------------------------------------------------------
11634
11586
//
11635
11587
// Get (create if needed) the unmanaged thread for an unmanaged debug event.
@@ -11706,7 +11658,7 @@ CordbUnmanagedThread * CordbProcess::GetUnmanagedThreadFromEvent(const DEBUG_EVE
11706
11658
UpdateRightSideDCB();
11707
11659
if ((this->GetDCB()->m_helperThreadStartAddr != NULL) && (pUnmanagedThread != NULL))
11708
11660
{
11709
- void * pStartAddr = GetThreadUserStartAddr( pEvent) ;
11661
+ void * pStartAddr = pEvent->u.CreateThread.lpStartAddress ;
11710
11662
11711
11663
if (pStartAddr == this->GetDCB()->m_helperThreadStartAddr)
11712
11664
{
0 commit comments