Add the following code fragment to gcscan.cpp:

StackWalkAction PrintCallerCallback(CrawlFrame* pCf, VOID* pData)
{
    MethodDesc *pMD = pCf->GetFunction();
    fprintf(stderr, "Allocation from: %s\n", pMD->GetName());
    return SWA_ABORT;
}

void PrintCaller()
{
    StackWalkFunctions(GetThread(), PrintCallerCallback, NULL);
}

And call PrintCaller in Alloc and AllocLHeap methods in the same file.

-Jan

This posting is provided "AS IS" with no warranties, and confers no
rights.

-----Original Message-----
From: Discussion of the Rotor Shared Source CLI implementation
[mailto:[EMAIL PROTECTED] On Behalf Of SUBSCRIBE
DOTNET-ROTOR Memomana
Sent: Sunday, November 23, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET-ROTOR] Method In Execution

Is there a way to determine which method is currently executing?

For example, during an object allocation, how would we determine which
method that actually calls 'newobj' instruction?

Thank you.

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to