public void Should_extract_values() { var type = Guid.NewGuid().ToString(); var function = Guid.NewGuid().ToString(); var file = Guid.NewGuid().ToString(); var line = 25; var column = 80; var tagsBuilder = new HerculesTagsBuilder(); tagsBuilder .AddValue(StackFrameTagNames.Type, type) .AddValue(StackFrameTagNames.Function, function) .AddValue(StackFrameTagNames.File, file) .AddValue(StackFrameTagNames.Line, line) .AddValue(StackFrameTagNames.Column, column); var tags = tagsBuilder.BuildTags(); var stackFrameData = new StackFrameData(tags); stackFrameData.Type.Should().Be(type); stackFrameData.Function.Should().Be(function); stackFrameData.File.Should().Be(file); stackFrameData.Line.Should().Be(line); stackFrameData.Column.Should().Be(column); }
protected DbgEngineImpl(DbgEngineImplDependencies deps, DbgManager dbgManager, DbgStartKind startKind) { if (deps == null) { throw new ArgumentNullException(nameof(deps)); } StartKind = startKind; lockObj = new object(); toEngineAppDomain = new Dictionary <DnAppDomain, DbgEngineAppDomain>(); toEngineModule = new Dictionary <CorModule, DbgEngineModule>(); toEngineThread = new Dictionary <DnThread, DbgEngineThread>(); toAssemblyModules = new Dictionary <DnAssembly, List <DnModule> >(); stackFrameData = new StackFrameData(); objectHolders = new HashSet <DnDebuggerObjectHolder>(); debuggerSettings = deps.DebuggerSettings; dbgDotNetCodeRangeService = deps.DotNetCodeRangeService; dbgDotNetNativeCodeLocationFactory = deps.DbgDotNetNativeCodeLocationFactory; dbgDotNetCodeLocationFactory = deps.DbgDotNetCodeLocationFactory; this.dbgManager = dbgManager ?? throw new ArgumentNullException(nameof(dbgManager)); dbgModuleMemoryRefreshedNotifier = deps.DbgModuleMemoryRefreshedNotifier; clrDacProvider = deps.ClrDacProvider; clrDac = NullClrDac.Instance; debuggerThread = new DebuggerThread("CorDebug"); debuggerThread.CallDispatcherRun(); dotNetValuesToCloseOnContinue = new List <DbgDotNetValueImpl>(); valuesToCloseNow = new List <DbgCorValueHolder>(); dmdRuntime = DmdRuntimeFactory.CreateRuntime(new DmdEvaluatorImpl(this), IntPtr.Size == 4 ? DmdImageFileMachine.I386 : DmdImageFileMachine.AMD64); toDynamicModuleHelper = new Dictionary <CorModule, DmdDynamicModuleHelperImpl>(); DmdDispatcher = new DmdDispatcherImpl(this); RawMetadataService = deps.RawMetadataService; }
public void Should_not_fail_on_empty_tags() { var stackFrameData = new StackFrameData(HerculesTags.Empty); stackFrameData.Type.Should().BeNull(); stackFrameData.Function.Should().BeNull(); stackFrameData.File.Should().BeNull(); stackFrameData.Line.Should().BeNull(); stackFrameData.Column.Should().BeNull(); }