Re: Method In Execution

Jan Kotas <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.rotor
Message-ID <A21210363B64FE44842335467A883AA971D066@RED-MSG-43.redmond.corp.microsoft.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.