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
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.
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
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
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
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
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
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
+.
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