Re: [DOTNET-ROTOR] Getting an mdTypeDef for the type of a field

2005-05-10 Thread Nam Tran
When you're inside the EE, you can certainly get an IMetaDataImport pointer. For example, if you have a Module*, you can get its IMetaDataImport pointer. If you'd like to use the internal import interface, after doing a GetSigOfFieldDef, you can use FieldSig class (siginfo.*pp) to pick out every

Re: [DOTNET-ROTOR] assembler directives

2004-11-10 Thread Nam Tran
Assembler directives (in textual form) are the work of the IL disassembler (in clr\src\ildasm). In .NET binaries, these correspond to metadata elements. Of course source compilers that generate IL assembler have their own way of emitting these directives. .locals is a part of the IL method header.

Re: [DOTNET-ROTOR] Get/SetILFunctionBody" bug in Shared Source CLI 1.0 Release? - II

2003-03-19 Thread Nam Tran
Fabian Schmied wrote: > > Jan, you are right, it actually does work. I guess, the exception I am > remembering occurred due to something else (I was also having problems with > DefineMethod not being callable in JitCompilationStarted and similar > things). As I reported earlier, I have no problems

Re: [DOTNET-ROTOR] Get/SetILFunctionBody" bug in Shared Source CLI 1.0 Release? - II

2003-03-18 Thread Nam Tran
or someone calling GetILCode directly with an rva obtained from metadata. And perhaps it suffers from similar undesired behaviors as your patch? In any case, I'd like to have a proper fix for the problem. > > -Jan > > This posting is provided "AS IS" with no warranties, a

Re: [DOTNET-ROTOR] Problems with profiling

2003-02-13 Thread Nam Tran
urns 0, the code pointer is >wrongly calculated and a BAD_FORMAT_ASSERT(header.Code != 0) fires. However, >different than in your case, I found that it didn't work with the CLR either (which >threw a BadFormatException, I think). Only if the image type of the module was >CorL

[DOTNET-ROTOR] Problems with profiling

2003-02-12 Thread Nam Tran
I've run into problems with Rotor's profiling interface while trying some simple things, initially just replacing body of a tiny method with an exact copy. I base my code on the sample profiler. I try the same thing with the CLR and things work fine there. Here are the problems: - Some event mask

Re: [DOTNET-ROTOR] Prestub frame construction

2002-12-12 Thread Nam Tran
Sorry, I found the answer. I forgot that the thunk is a call to the Prestub. That call pushes the "return address" onto the stack. The "return address" happens to be the MethodDesc pointer. Clever! Thanks, Nam Nam Tran wrote: > > I'm trying to understand the det

[DOTNET-ROTOR] Prestub frame construction

2002-12-12 Thread Nam Tran
I'm trying to understand the details of how the Prestub and the JIT backpatch work. On x86, the PrestubFrame looks like: +...stack-based args for real method +12 return address +8 m_Datum (MethodDesc*) +4 m_Next ESI--->+0 the frame vptr +.

[DOTNET-ROTOR] Minor error in RegMeta::DeleteToken()

2002-11-19 Thread Nam Tran
For deleting a property, the special name Event flags are being used. They happen to have the right values. But really they should be the special name Property flags. Typical "cut & paste" job, I guess. Nam