// This is called when the python extension is first loaded. public static void LoadExtension() { WriteOutput("IronPython-Mdbg Extension loaded"); g_python = new IronPython.Hosting.PythonEngine(); g_pythonInteractive = new PythonCommandLine(g_python); string ver = g_python.GetType().Assembly.GetName().Version.ToString(); WriteOutput(MDbgOutputConstants.Ignore, "Binding against Iron Python version: " + ver); // Get original load command, for use in python load command. g_origLoadCmd = Shell.Commands.Lookup("load"); // Add Python extension commands to Shell.Commands. MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(PythonExt)); // Add the current directory to the python engine search path. g_python.AddToPath(Environment.CurrentDirectory); // Tell Python about some key objects in Mdbg. Python can then reflect over these objects. // These variables live at some special "main" scope. Python Modules imported via python "import" command // can't access them. Use PythonEngine.ExecuteFile() to import files such that they can access these vars. g_python.Globals.Add("CommandBase", IronPython.Runtime.Types.ReflectedType.FromType(typeof(CommandBase))); // Hook input + output. This is redirecting pythons 'sys.stdout, sys.stdin, sys.stderr' // This connects python's sys.stdout --> Stream --> Mdbg console. MDbgStream s = new MDbgStream(); // New codepaths for IronPython 1.0 g_python.SetStandardInput(s); g_python.SetStandardOutput(s); g_python.SetStandardError(s); }
/// <summary> /// Loads the Silverlight Extension for Mdbg /// </summary> public static void LoadExtension() { sVersionString = ""; MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(SilverlightExtension)); WriteOutput("Silverlight Extension Loaded"); }
public static void LoadExtension() { try { MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(NppExtension)); } catch { } Gui(""); }
public static void LoadExtension() { try { MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(cdbg)); } catch { // we'll ignore errors about multiple defined gui command in case gui is loaded // multiple times. } Con(""); }
public static void LoadExtension() { MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(EncExtension)); WriteOutput("Extension EnC loaded"); }
public static void UnloadExtension() { MDbgAttributeDefinedCommand.RemoveCommandsFromType(Shell.Commands, typeof(IldasmExtension)); //WriteOutput("Extension ildasm unloaded"); }
public static void LoadExtension() { MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(IldasmExtension)); WriteOutput("Extension ildasm loaded"); WriteOutput("ildasm command loaded. For help type 'help'"); }
public static void UnloadExtension() { MDbgAttributeDefinedCommand.RemoveCommandsFromType(Shell.Commands, typeof(EncExtension)); }
/// <summary> /// Loads extension into the debugger. /// </summary> public static void LoadExtension() { MDbgAttributeDefinedCommand.AddCommandsFromType(Shell.Commands, typeof(WatchTraceExtension)); WriteOutput("wtrace extension loaded"); }
/// <summary> /// Unloads the Silverlight Extension for Mdbg /// </summary> public static void UnloadExtension() { MDbgAttributeDefinedCommand.RemoveCommandsFromType(Shell.Commands, typeof(SilverlightExtension)); WriteOutput("Silverlight Extension Unloaded"); }