Esempio n. 1
0
        /// <summary>
        /// Unloads the currently loaded program.
        /// </summary>
        public void Unload()
        {
            if (Engine == null) throw new NoProgramLoadedException();

            var oldEngine = Engine;
            Engine = null;
            DebugInformation.Clear();

            // It is important to set the Engine to null and Clear the
            // Debug information before calling Stop, because it is
            // the Engine who signals the end of operation.

            // So if Stop was called first, it could be signaled
            // before the debugger is fully stopped, especially
            // if the engine thread was not started at all.
            oldEngine.Stop();
        }
Esempio n. 2
0
 /// <summary>
 /// Loads the specified program.
 /// </summary>
 /// <param name="path">Full path to the program binary.</param>
 /// <param name="debugInfoPath">Full path to the Debug Information file.</param>
 public void Load(string path, string debugInfoPath)
 {
     Target.Load(path);
     if (File.Exists(debugInfoPath))
     {
         DebugInformation.LoadFromFile(debugInfoPath);
     }
     Engine = new Engine(this);
 }