示例#1
0
        public unsafe MethodProps GetMethodProps(uint methodToken)
        {
            MethodProps methodProps = new MethodProps();

            try
            {
                IntPtr sigPtr = IntPtr.Zero;
                methodProps.Token = methodToken;
                methodProps.Name  =
                    Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString)
                {
                    uint sigBlobSize;
                    metaData.GetMethodProps(methodProps.Token,
                                            out methodProps.ClassToken,
                                            pString, pStringLenght, out stringLenght, // The string to get
                                            out methodProps.Flags,
                                            out sigPtr,                               //new IntPtr(&pSigBlob),
                                            out sigBlobSize,
                                            out methodProps.CodeRVA,
                                            out methodProps.ImplFlags);
                });
            }
            catch
            {
            }
            return(methodProps);
        }
示例#2
0
        public MethodProps GetMethodProps(uint methodToken)
        {
            MethodProps ret     = new MethodProps();
            IntPtr      sigPtr  = IntPtr.Zero;
            uint        sigSize = 0;

            ret.Token = methodToken;
            ret.Name  = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) {
                metaData.GetMethodProps(
                    ret.Token,
                    out ret.ClassToken,
                    pString, pStringLenght, out stringLenght,                     // The string to get
                    out ret.Flags,
                    out sigPtr,
                    out sigSize,
                    out ret.CodeRVA,
                    out ret.ImplFlags
                    );
            });
            ret.SigBlob = new Blob(sigPtr, sigSize);
            return(ret);
        }
示例#3
0
		internal MethodInfo(DebugType declaringType, MethodProps methodProps):base (declaringType)
		{
			this.methodProps = methodProps;
		}
示例#4
0
		internal Function(Thread thread, FrameID frameID, ICorDebugILFrame corILFrame)
		{
			this.process = thread.Process;
			this.thread = thread;
			this.frameID = frameID;
			this.CorILFrame = corILFrame;
			corFunction = corILFrame.Function;
			module = process.GetModule(corFunction.Module);
			
			methodProps = module.MetaData.GetMethodProps(corFunction.Token);
			
			// Force some callback when function steps out so that we can expire it
			stepOutStepper = new Stepper(this, "Function Tracker");
			stepOutStepper.StepOut();
			stepOutStepper.PauseWhenComplete = false;
			
			process.TraceMessage("Function " + this.ToString() + " created");
		}