Ejemplo n.º 1
0
 public DebugProcessModule(IntPtr imageBase, string imageFile, ExecutableMetaInfo emi)
 {
     this.ImageBase = imageBase;
     this.ImageFile = imageFile;
     this.ModuleMetaInfo = emi;
     ContainsSymbolData = emi.CodeViewSection != null;
 }
Ejemplo n.º 2
0
 public static ExecutableMetaInfo ExtractFrom(string executableFile)
 {
     using (var stream = new FileStream(executableFile, FileMode.Open, FileAccess.Read))
     using (var br = new BinaryReader(stream))
     {
         var emi = new ExecutableMetaInfo();
         emi.Read(br);
         return emi;
     }
 }
Ejemplo n.º 3
0
 public static ExecutableMetaInfo ExtractFrom(string executableFile)
 {
     using (var stream = new FileStream(executableFile, FileMode.Open, FileAccess.Read))
         using (var br = new BinaryReader(stream))
         {
             var emi = new ExecutableMetaInfo();
             emi.Read(br);
             return(emi);
         }
 }
Ejemplo n.º 4
0
        internal Debuggee(string executable,
			IntPtr procHandle,uint procId,
			IntPtr mainThreadHandle,uint mainThreadId,
			ExecutableMetaInfo emi = null)
        {
            // Note: The CodeView information extraction will be done per module, i.e. when the module/process is loaded into the memory.
            Memory = new MemoryManagement(this);
            Breakpoints = new BreakpointManagement(this);
            CodeStepping = new Stepping(this);

            var mProc = new DebugProcess(this,executable, procHandle, procId, mainThreadHandle, mainThreadId, emi);

            CurrentThread = mProc.MainThread;
            processes.Add(mProc);
        }
Ejemplo n.º 5
0
        public DebugProcess(Debuggee dbg,
			string executableFile,
			IntPtr processHandle, uint processId,
			IntPtr mainThreadHandle, uint mainThreadId,
			ExecutableMetaInfo emi)
        {
            this.Debuggee = dbg;
            Handle = processHandle;
            Id = processId;

            MainModule = new DebugProcessModule(new IntPtr(emi.PEHeader.OptionalHeader32.ImageBase),executableFile, emi);
            RegModule(MainModule);

            MainThread = new DebugThread(this, mainThreadHandle, mainThreadId, MainModule.StartAddress, IntPtr.Zero);
            RegThread(MainThread);
        }