internal static void ExecuteInternal(ModuleVM vm, bool newTab) { if (vm == null) { return; } if (vm.Module.IsDynamic || vm.Module.IsInMemory) { return; //TODO: Support dynamic and in-memory modules } var serAsm = vm.Module.SerializedDnModuleWithAssembly; var asm = MainWindow.Instance.LoadAssembly(serAsm.Assembly, serAsm.Module); if (asm == null) { return; } var mod = asm.ModuleDefinition; if (mod == null) { return; } // The asm could've been added lazily to the list so add a short delay before we select it MainWindow.Instance.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => { if (newTab) { MainWindow.Instance.OpenNewEmptyTab(); } MainWindow.Instance.JumpToReference(mod); })); }
public void WriteVersion(ModuleVM vm) { if (vm.Version != null) { output.Write(vm.Version); } }
public void WriteTimestamp(ModuleVM vm) { var ts = vm.Timestamp; if (ts != null) { var date = Epoch.AddSeconds(ts.Value); var dateString = date.ToString(CultureInfo.CurrentUICulture.DateTimeFormat); output.Write(dateString, TextTokenType.Text); } }
void WriteFilename(ModuleVM vm, string filename) { if (vm.Module.IsDynamic || vm.Module.IsInMemory) { filename = DebugOutputUtils.FilterName(filename, 300); } output.WriteFilename(filename); }
public void WriteVersion(ModuleVM vm) { if (vm.Version == null) { output.Write("???", TextTokenType.Error); } else { output.Write(vm.Version); } }
public void WriteTimestamp(ModuleVM vm) { var ts = vm.Timestamp; if (ts != null) { var date = Epoch.AddSeconds(ts.Value); var dateString = date.ToString(CultureInfo.CurrentUICulture.DateTimeFormat); output.Write(dateString, TextTokenKind.Text); } }
public void WriteAddress(ModuleVM vm) { ulong addr = vm.Module.Address; ulong endAddr = addr + vm.Module.Size; if (addr == 0) output.Write(dnSpy_Debugger_Resources.Module_NoAddress, TextTokenKind.Text); else { WriteAddress(addr); output.Write("-", TextTokenKind.Operator); WriteAddress(endAddr); } }
internal static void ExecuteInternal(ModuleVM vm, bool newTab) { if (vm == null) { return; } if (ShowErrorIfDynamic(vm.Module)) { GoToFile(ModuleLoader.Instance.LoadModule(vm.Module, true), newTab); } }
public void WriteAddress(ModuleVM vm) { ulong addr = vm.Module.Address; ulong endAddr = addr + vm.Module.Size; if (addr == 0) output.Write(BoxedTextColor.Text, dnSpy_Debugger_Resources.Module_NoAddress); else { WriteAddress(addr); output.Write(BoxedTextColor.Operator, "-"); WriteAddress(endAddr); } }
public void WriteAddress(ModuleVM vm) { ulong addr = vm.Module.Address; ulong endAddr = addr + vm.Module.Size; if (addr == 0) output.Write("<no address>", TextTokenType.Text); else { WriteAddress(addr); output.Write('-', TextTokenType.Operator); WriteAddress(endAddr); } }
static void ExecuteInternal(ModuleVM vm, bool newTab) { if (vm == null) { return; } if (GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(vm.Module)) { GoToModuleModulesCtxMenuCommand.GoToFile(InMemoryModuleManager.Instance.LoadFile(vm.Module, true), newTab); } }
public void WriteAddress(ModuleVM vm) { ulong addr = vm.Module.Address; ulong endAddr = addr + vm.Module.Size; if (addr == 0) { output.Write("<no address>", TextTokenType.Text); } else { WriteAddress(addr); output.Write('-', TextTokenType.Operator); WriteAddress(endAddr); } }
public void WriteAddress(ModuleVM vm) { ulong addr = vm.Module.Address; ulong endAddr = addr + vm.Module.Size; if (addr == 0) { output.Write(BoxedTextColor.Text, dnSpy_Debugger_Resources.Module_NoAddress); } else { WriteAddress(addr); output.Write(BoxedTextColor.Operator, "-"); WriteAddress(endAddr); } }
public void WriteAddress(ModuleVM vm) { ulong addr = vm.Module.Address; ulong endAddr = addr + vm.Module.Size; if (addr == 0) { output.Write(dnSpy_Debugger_Resources.Module_NoAddress, TextTokenKind.Text); } else { WriteAddress(addr); output.Write("-", TextTokenKind.Operator); WriteAddress(endAddr); } }
void WriteFilename(ModuleVM vm, string filename) { if (vm.Module.IsDynamic || vm.Module.IsInMemory) filename = DebugOutputUtils.FilterName(filename, 300); output.WriteFilename(filename); }
static void ExecuteInternal(IDocumentTabService documentTabService, Lazy <IInMemoryModuleService> inMemoryModuleService, ModuleVM vm, bool newTab) { if (vm == null) { return; } if (GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(inMemoryModuleService, vm.Module)) { GoToModuleModulesCtxMenuCommand.GoToFile(documentTabService, inMemoryModuleService.Value.LoadDocument(vm.Module, true), newTab); } }
public void WriteVersion(ModuleVM vm) { if (vm.Version != null) output.Write(vm.Version); }
public void WriteOrder(ModuleVM vm) { output.Write(string.Format("{0}", vm.Module.ModuleOrder), TextTokenType.Number); }
public void WriteVersion(ModuleVM vm) { if (vm.Version == null) output.Write("???", TextTokenType.Error); else output.Write(vm.Version); }
internal static void ExecuteInternal(IFileTabManager fileTabManager, Lazy <IInMemoryModuleManager> inMemoryModuleManager, Lazy <IModuleLoader> moduleLoader, ModuleVM vm, bool newTab) { if (vm == null) { return; } if (ShowErrorIfDynamic(inMemoryModuleManager, vm.Module)) { GoToFile(fileTabManager, moduleLoader.Value.LoadModule(vm.Module, canLoadDynFile: true, isAutoLoaded: false), newTab); } }
public void WriteAppDomain(ModuleVM vm) { output.Write(vm.Module.AppDomain.CorAppDomain, dbg); }
public void WriteOrder(ModuleVM vm) => output.Write(BoxedTextColor.Number, string.Format("{0}", vm.Module.UniqueId));
public void WriteProcess(ModuleVM vm) { output.Write(vm.Module.Process, useHex); }
public void WriteAppDomain(ModuleVM vm) { output.Write(vm.Module.AppDomain.CorAppDomain); }
static void ExecuteInternal(IFileTabManager fileTabManager, Lazy <IInMemoryModuleManager> inMemoryModuleManager, ModuleVM vm, bool newTab) { if (vm == null) { return; } if (GoToModuleModulesCtxMenuCommand.ShowErrorIfDynamic(inMemoryModuleManager, vm.Module)) { GoToModuleModulesCtxMenuCommand.GoToFile(fileTabManager, inMemoryModuleManager.Value.LoadFile(vm.Module, true), newTab); } }
internal static void ExecuteInternal(IDocumentTabService documentTabService, Lazy <IInMemoryModuleService> inMemoryModuleService, Lazy <IModuleLoader> moduleLoader, ModuleVM vm, bool newTab) { if (vm == null) { return; } if (ShowErrorIfDynamic(inMemoryModuleService, vm.Module)) { GoToFile(documentTabService, moduleLoader.Value.LoadModule(vm.Module, canLoadDynFile: true, isAutoLoaded: false), newTab); } }
public void WriteName(ModuleVM vm) { WriteFilename(vm, DebugOutputUtils.GetFilename(vm.Module.Name)); }
public void WriteOptimized(ModuleVM vm) { output.WriteYesNo(vm.IsOptimized); }
public void WriteInMemory(ModuleVM vm) { output.WriteYesNo(vm.Module.IsInMemory); }
public void WriteAppDomain(ModuleVM vm) => output.Write(vm.Module.AppDomain.CorAppDomain, dbg);
public void WritePath(ModuleVM vm) { WriteFilename(vm, vm.Module.Name); }
public void WriteDynamic(ModuleVM vm) { output.WriteYesNo(vm.Module.IsDynamic); }
public void WriteOrder(ModuleVM vm) { output.Write(string.Format("{0}", vm.Module.ModuleOrder), TextTokenKind.Number); }
public void WriteOrder(ModuleVM vm) { output.Write(string.Format("{0}", vm.Module.UniqueId), TextTokenKind.Number); }