CreateFrame() 추상적인 개인적인 메소드

abstract private CreateFrame ( System.Thread thread, FrameType type, TargetMemoryAccess target, Registers regs ) : StackFrame
thread System.Thread
type FrameType
target TargetMemoryAccess
regs Registers
리턴 StackFrame
예제 #1
0
            public StackFrame Unwind(StackFrame frame, TargetMemoryAccess target,
                                     Architecture arch)
            {
                Registers old_regs = frame.Registers;

                Registers regs = arch.CopyRegisters(old_regs);

                SetRegisters(regs, target, arch, columns);

                Register eip = GetRegister(regs, 0);
                Register esp = GetRegister(regs, 1);
                Register ebp = GetRegister(regs, 2);

                if (!eip.Valid || !esp.Valid)
                {
                    return(null);
                }

                TargetAddress address = new TargetAddress(
                    target.AddressDomain, eip.Value);
                TargetAddress stack = new TargetAddress(
                    target.AddressDomain, esp.Value);

                TargetAddress frame_addr = TargetAddress.Null;

                if (ebp.Valid)
                {
                    frame_addr = new TargetAddress(
                        target.AddressDomain, ebp.Value);
                }

                return(arch.CreateFrame(
                           frame.Thread, FrameType.Normal, target, address, stack, frame_addr, regs));
            }
예제 #2
0
            public StackFrame Unwind(StackFrame frame, TargetMemoryAccess target,
						  Architecture arch)
            {
                Registers old_regs = frame.Registers;

                Registers regs = arch.CopyRegisters (old_regs);

                SetRegisters (regs, target, arch, columns);

                Register eip = GetRegister (regs, 0);
                Register esp = GetRegister (regs, 1);
                Register ebp = GetRegister (regs, 2);

                if (!eip.Valid || !esp.Valid)
                    return null;

                TargetAddress address = new TargetAddress (
                    target.AddressDomain, eip.Value);
                TargetAddress stack = new TargetAddress (
                    target.AddressDomain, esp.Value);

                TargetAddress frame_addr = TargetAddress.Null;
                if (ebp.Valid)
                    frame_addr = new TargetAddress (
                        target.AddressDomain, ebp.Value);

                return arch.CreateFrame (
                    frame.Thread, FrameType.Normal, target, address, stack, frame_addr, regs);
            }