예제 #1
0
        /// <summary>
        /// Reads the X64 structure.
        /// </summary>
        /// <param name="pointer">The pointer.</param>
        private static ThreadContext ReadX64Structure(IntPtr pointer)
        {
            CONTEXT_X64 structure = (CONTEXT_X64)Marshal.PtrToStructure(pointer, typeof(CONTEXT_X64));

            return(new ThreadContext()
            {
                InstructionPointer = structure.Rip,
                StackPointer = structure.Rsp,
                FramePointer = structure.Rbp,
                Bytes = ReadBytes(pointer, typeof(CONTEXT_X64)),
            });
        }
예제 #2
0
        /// <summary>
        /// Reads the X64 structure.
        /// </summary>
        /// <param name="pointer">The pointer.</param>
        private static ThreadContext ReadX64Structure(IntPtr pointer)
        {
            CONTEXT_X64 structure = (CONTEXT_X64)Marshal.PtrToStructure(pointer, typeof(CONTEXT_X64));

            return(new WindowsThreadContext(structure.Rip, structure.Rsp, structure.Rbp, ReadBytes(pointer, typeof(CONTEXT_X64))));
        }