diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Breakpoints/Breakpoint.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Breakpoints/Breakpoint.cs index 0f84fae073..2cdbb328c0 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Breakpoints/Breakpoint.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Breakpoints/Breakpoint.cs @@ -46,12 +46,10 @@ namespace Debugger } } - public bool Enabled { + public bool Enabled { get { if (HadBeenSet) { - int active; - corBreakpoint.IsActive(out active); - enabled = (active == 1); + enabled = (corBreakpoint.IsActive == 1); } return enabled; } @@ -126,11 +124,8 @@ namespace Debugger if (!sourcecodeSegment.GetFunctionAndOffset(debugger, true, out corFunction, out ilOffset)) { return false; } - - ICorDebugCode code; - corFunction.GetILCode(out code); - - code.CreateBreakpoint((uint)ilOffset, out corBreakpoint); + + corBreakpoint = corFunction.ILCode.CreateBreakpoint((uint)ilOffset); hadBeenSet = true; corBreakpoint.Activate(enabled?1:0); diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs index 31f4c95623..89913220f3 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/Internal/ManagedCallback.cs @@ -58,11 +58,8 @@ namespace Debugger void EnterCallback(string name, ICorDebugAppDomain pAppDomain) { EnterCallback(name); - - ICorDebugProcess pProcess; - pAppDomain.GetProcess(out pProcess); - callingProcess = debugger.GetProcess(pProcess); + callingProcess = debugger.GetProcess(pAppDomain.Process); callingProcess.IsRunning = false; } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Modules/Module.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Modules/Module.cs index 264d1b0784..45596642b6 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Modules/Module.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Modules/Module.cs @@ -22,9 +22,6 @@ namespace Debugger bool unloaded = false; string fullPath; string fullPathPDB; - ulong baseAdress; - int isDynamic; - int isInMemory; int orderOfLoading = 0; readonly ICorDebugModule corModule; @@ -63,19 +60,19 @@ namespace Debugger public ulong BaseAdress { get { - return baseAdress; + return corModule.BaseAddress; } } public bool IsDynamic { get { - return isDynamic == 1; + return corModule.IsDynamic == 1; } } public bool IsInMemory { get { - return isInMemory == 1; + return corModule.IsInMemory == 1; } } @@ -129,15 +126,8 @@ namespace Debugger corModule = pModule; - pModule.GetBaseAddress(out baseAdress); - - pModule.IsDynamic(out isDynamic); - - pModule.IsInMemory(out isInMemory); - Guid metaDataInterfaceGuid = new Guid("{ 0x7dac8207, 0xd3ae, 0x4c75, { 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44 } }"); - object pMetaDataInterface; - pModule.GetMetaDataInterface(ref metaDataInterfaceGuid, out pMetaDataInterface); + object pMetaDataInterface = pModule.GetMetaDataInterface(ref metaDataInterfaceGuid); metaDataInterface = (IMetaDataImport) pMetaDataInterface; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs index 938a5c1439..3bc9268089 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Exception.cs @@ -40,7 +40,7 @@ namespace Debugger creationTime = DateTime.Now; this.debugger = thread.Debugger; this.thread = thread; - thread.CorThread.GetCurrentException(out corValue); + corValue = thread.CorThread.CurrentException; exceptionType = thread.CurrentExceptionType; runtimeValue = Value.CreateValue(debugger, corValue); runtimeValueException = runtimeValue as ObjectValue; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs index 4393318415..1aa0324f91 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs @@ -65,9 +65,7 @@ namespace Debugger internal ICorDebugClass ContaingClass { get { - ICorDebugClass corClass; - corFunction.GetClass(out corClass); - return corClass; + return corFunction.Class; } } @@ -88,9 +86,7 @@ namespace Debugger if (this.HasExpired) { return new UnavailableValue(debugger, "Function has expired"); } else { - ICorDebugValue argThis = null; - CorILFrame.GetArgument(0, out argThis); - return new ObjectValue(debugger, argThis, ContaingClass); + return new ObjectValue(debugger, CorILFrame.GetArgument(0), ContaingClass); } } } @@ -104,14 +100,10 @@ namespace Debugger this.frameIndex = frameIndex; this.corILFrame = corILFrame; this.corILFrameDebuggerSessionID = debugger.SessionID; - corILFrame.GetFunction(out corFunction); - uint functionToken; - corFunction.GetToken(out functionToken); - ICorDebugModule corModule; - corFunction.GetModule(out corModule); - module = debugger.GetModule(corModule); + corFunction = corILFrame.Function; + module = debugger.GetModule(corFunction.Module); - methodProps = module.MetaData.GetMethodProps(functionToken); + methodProps = module.MetaData.GetMethodProps(corFunction.Token); // Expiry the function when it is finished Stepper tracingStepper = thread.CreateStepper(); @@ -136,8 +128,7 @@ namespace Debugger internal uint corInstructionPtr { get { uint corInstructionPtr; - CorDebugMappingResult MappingResult; - CorILFrame.GetIP(out corInstructionPtr,out MappingResult); + CorILFrame.GetIP(out corInstructionPtr); return corInstructionPtr; } } @@ -176,12 +167,11 @@ namespace Debugger public void StepOut() { - ICorDebugStepper stepper; - CorILFrame.CreateStepper(out stepper); + ICorDebugStepper stepper = CorILFrame.CreateStepper(); stepper.StepOut(); - + debugger.CurrentThread.AddActiveStepper(stepper); - + debugger.Continue(); } @@ -201,7 +191,7 @@ namespace Debugger ICorDebugStepper stepper; if (stepIn) { - CorILFrame.CreateStepper(out stepper); + stepper = CorILFrame.CreateStepper(); if (stepper.Is()) { // Is the debuggee .NET 2.0? stepper.SetUnmappedStopMask(CorDebugUnmappedStop.STOP_NONE); @@ -218,7 +208,7 @@ namespace Debugger // Mind that step in which ends in code without symblols is cotinued // so the next step over ensures that we atleast do step over - CorILFrame.CreateStepper(out stepper); + stepper = CorILFrame.CreateStepper(); if (stepper.Is()) { // Is the debuggee .NET 2.0? stepper.SetUnmappedStopMask(CorDebugUnmappedStop.STOP_NONE); @@ -286,14 +276,11 @@ namespace Debugger for (int i = sequencePointCount - 1; i >= 0; i--) // backwards if (offsets[i] <= offset || i == 0) { // Set inforamtion about current IL range - ICorDebugCode code; - corFunction.GetILCode(out code); - uint codeSize; - code.GetSize(out codeSize); + int codeSize = (int)corFunction.ILCode.Size; retVal.ILOffset = (int)offset; retVal.ILStart = offsets[i]; - retVal.ILEnd = (i + 1 < sequencePointCount) ? offsets[i + 1] : (int)codeSize; + retVal.ILEnd = (i + 1 < sequencePointCount) ? offsets[i + 1] : codeSize; // 0xFeeFee means "code generated by compiler" // If we are in generated sequence use to closest real one instead, @@ -302,7 +289,7 @@ namespace Debugger // Look ahead for 'real' sequence while (i + 1 < sequencePointCount && startLine[i] == 0xFeeFee) { i++; - retVal.ILEnd = (i + 1 < sequencePointCount) ? offsets[i + 1] : (int)codeSize; + retVal.ILEnd = (i + 1 < sequencePointCount) ? offsets[i + 1] : codeSize; } // Look back for 'real' sequence while (i - 1 >= 0 && startLine[i] == 0xFeeFee) { @@ -339,7 +326,7 @@ namespace Debugger if (j + 1 < sequencePointCount) { stepRanges.Add(offsets[j + 1]); } else { - stepRanges.Add((int)codeSize); + stepRanges.Add(codeSize); } } } @@ -371,9 +358,7 @@ namespace Debugger if (!suggestion.GetFunctionAndOffset(debugger, false, out corFunction, out ilOffset)) { return null; } else { - uint token; - corFunction.GetToken(out token); - if (token != methodProps.Token) { + if (corFunction.Token != methodProps.Token) { return null; } else { try { @@ -428,10 +413,8 @@ namespace Debugger public int ArgumentCount { get { - ICorDebugValueEnum argumentEnum; - CorILFrame.EnumerateArguments(out argumentEnum); - uint argCount; - argumentEnum.GetCount(out argCount); + ICorDebugValueEnum argumentEnum = CorILFrame.EnumerateArguments(); + uint argCount = argumentEnum.Count; if (!IsStatic) { argCount--; // Remove 'this' from count } @@ -441,10 +424,8 @@ namespace Debugger internal ICorDebugValue GetArgumentValue(int index) { - ICorDebugValue arg; // Non-static functions include 'this' as first argument - CorILFrame.GetArgument((uint)(IsStatic? index : (index + 1)), out arg); - return arg; + return CorILFrame.GetArgument((uint)(IsStatic? index : (index + 1))); } public Variable GetArgumentVariable(int index) @@ -508,7 +489,7 @@ namespace Debugger } else { ICorDebugValue corValue; try { - CorILFrame.GetLocalVariable((uint)symVar.AddressField1, out corValue); + corValue = CorILFrame.GetLocalVariable((uint)symVar.AddressField1); } catch (COMException e) { if ((uint)e.ErrorCode == 0x80131304) return new UnavailableValue(debugger, "Unavailable in optimized code"); throw; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs index 88620e395f..c7c89b3102 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs @@ -104,21 +104,21 @@ namespace Debugger fixed (uint* pprocessStartupInfo = processStartupInfo) fixed (uint* pprocessInfo = processInfo) - debugger.CorDebug.CreateProcess( - filename, // lpApplicationName - // If we do not prepend " ", the first argument migh just get lost - " " + arguments, // lpCommandLine - ref secAttr, // lpProcessAttributes - ref secAttr, // lpThreadAttributes - 1,//TRUE // bInheritHandles - 0, // dwCreationFlags - IntPtr.Zero, // lpEnvironment - workingDirectory, // lpCurrentDirectory - (uint)pprocessStartupInfo, // lpStartupInfo - (uint)pprocessInfo, // lpProcessInformation, - CorDebugCreateProcessFlags.DEBUG_NO_SPECIAL_OPTIONS, // debuggingFlags - out outProcess // ppProcess - ); + outProcess = + debugger.CorDebug.CreateProcess( + filename, // lpApplicationName + // If we do not prepend " ", the first argument migh just get lost + " " + arguments, // lpCommandLine + ref secAttr, // lpProcessAttributes + ref secAttr, // lpThreadAttributes + 1,//TRUE // bInheritHandles + 0, // dwCreationFlags + IntPtr.Zero, // lpEnvironment + workingDirectory, // lpCurrentDirectory + (uint)pprocessStartupInfo, // lpStartupInfo + (uint)pprocessInfo, // lpProcessInformation, + CorDebugCreateProcessFlags.DEBUG_NO_SPECIAL_OPTIONS // debuggingFlags + ); return new Process(debugger, outProcess); } @@ -160,10 +160,8 @@ namespace Debugger public void Terminate() { - int running; - corProcess.IsRunning(out running); // Resume stoped tread - if (running == 0) { + if (corProcess.IsRunning == 0) { Continue(); // TODO: Remove this... } // Stop&terminate - both must be called diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs index bf04f567a4..9d82202adc 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs @@ -208,13 +208,11 @@ namespace Debugger return false; } } - + ISymbolMethod symMethod; symMethod = symReader.GetMethodFromDocumentPosition(symDoc, StartLine, StartColumn); - - ICorDebugFunction corFunction; - module.CorModule.GetFunctionFromToken((uint)symMethod.Token.GetToken(), out corFunction); - function = corFunction; + + function = module.CorModule.GetFunctionFromToken((uint)symMethod.Token.GetToken()); ilOffset = symMethod.GetOffset(symDoc, StartLine, StartColumn); diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs index d06021be2f..4d97681ce1 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs @@ -82,27 +82,23 @@ namespace Debugger { this.debugger = debugger; this.corThread = corThread; - corThread.GetID(out id); - - ICorDebugProcess corProcess; - corThread.GetProcess(out corProcess); - this.process = debugger.GetProcess(corProcess); + id = corThread.ID; + + this.process = debugger.GetProcess(corThread.Process); } - + public bool Suspended { - get { + get { if (process.IsRunning) return lastSuspendedState; - - CorDebugThreadState state; - corThread.GetDebugState(out state); - lastSuspendedState = (state == CorDebugThreadState.THREAD_SUSPEND); + + lastSuspendedState = (corThread.DebugState == CorDebugThreadState.THREAD_SUSPEND); return lastSuspendedState; } - set { - corThread.SetDebugState((value==true)?CorDebugThreadState.THREAD_SUSPEND:CorDebugThreadState.THREAD_RUN); + set { + corThread.SetDebugState((value==true)?CorDebugThreadState.THREAD_SUSPEND:CorDebugThreadState.THREAD_RUN); } } - + public ThreadPriority Priority { get { if (!HasBeenLoaded) return lastPriority; @@ -119,10 +115,8 @@ namespace Debugger get { if (!HasBeenLoaded) throw new DebuggerException("Thread has not started jet"); process.AssertPaused(); - - ICorDebugValue corValue; - corThread.GetObject(out corValue); - return Value.CreateValue(debugger, corValue); + + return Value.CreateValue(debugger, corThread.Object); } } @@ -149,10 +143,7 @@ namespace Debugger internal Stepper CreateStepper() { - ICorDebugStepper corStepper; - corThread.CreateStepper(out corStepper); - - Stepper stepper = new Stepper(debugger, corStepper); + Stepper stepper = new Stepper(debugger, corThread.CreateStepper()); stepper.StepComplete += delegate { steppers.Remove(stepper); }; @@ -192,9 +183,7 @@ namespace Debugger internal void DeactivateAllSteppers() { foreach(ICorDebugStepper stepper in activeSteppers) { - int active; - stepper.IsActive(out active); - if (active != 0) { + if (stepper.IsActive != 0) { stepper.Deactivate(); debugger.TraceMessage("Stepper deactivated"); } @@ -241,11 +230,9 @@ namespace Debugger { process.AssertPaused(); - ICorDebugChainEnum corChainEnum; - corThread.EnumerateChains(out corChainEnum); + ICorDebugChainEnum corChainEnum = corThread.EnumerateChains(); - uint chainCount; - corChainEnum.GetCount(out chainCount); + uint chainCount = corChainEnum.Count; uint chainIndex = chainCount; @@ -258,25 +245,19 @@ namespace Debugger } while (true) { - uint chainsFetched; ICorDebugChain[] corChains = new ICorDebugChain[1]; // One at time - corChainEnum.Next(1, corChains, out chainsFetched); + uint chainsFetched = corChainEnum.Next(1, corChains); if (chainsFetched == 0) break; // We are done chainIndex--; - CorDebugChainReason reason; - corChains[0].GetReason(out reason); + CorDebugChainReason reason = corChains[0].Reason; - int isManaged; - corChains[0].IsManaged(out isManaged); - if (isManaged == 0) continue; // Only managed ones + if (corChains[0].IsManaged == 0) continue; // Only managed ones - ICorDebugFrameEnum corFrameEnum; - corChains[0].EnumerateFrames(out corFrameEnum); + ICorDebugFrameEnum corFrameEnum = corChains[0].EnumerateFrames(); - uint frameCount; - corFrameEnum.GetCount(out frameCount); + uint frameCount = corFrameEnum.Count; uint frameIndex = frameCount; @@ -288,9 +269,8 @@ namespace Debugger } while (true) { - uint framesFetched; ICorDebugFrame[] corFrames = new ICorDebugFrame[1]; // Only one at time - corFrameEnum.Next(1, corFrames, out framesFetched); + uint framesFetched = corFrameEnum.Next(1, corFrames); if (framesFetched == 0) break; // We are done frameIndex--; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs index 34c6aa6853..163fd4ee42 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ArrayValue.cs @@ -53,18 +53,16 @@ namespace Debugger return txt; } } - - + + internal unsafe ArrayValue(NDebugger debugger, ICorDebugValue corValue):base(debugger, corValue) { corArrayValue = this.corValue.CastTo(); - uint corElementTypeRaw; - corArrayValue.GetElementType(out corElementTypeRaw); - corElementType = (CorElementType)corElementTypeRaw; - - corArrayValue.GetRank(out rank); - corArrayValue.GetCount(out lenght); - + corElementType = (CorElementType)corArrayValue.ElementType; + + rank = corArrayValue.Rank; + lenght = corArrayValue.Count; + dimensions = new uint[rank]; fixed (void* pDimensions = dimensions) corArrayValue.GetDimensions(rank, new IntPtr(pDimensions)); @@ -112,7 +110,7 @@ namespace Debugger ICorDebugValue element; unsafe { fixed (void* pIndices = indices) { - updatedVal.corArrayValue.GetElement(rank, new IntPtr(pIndices), out element); + element = updatedVal.corArrayValue.GetElement(rank, new IntPtr(pIndices)); } } return Value.CreateValue(debugger, element); diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs index e8f2eaed70..c1278ff70f 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Evals/Eval.cs @@ -122,7 +122,7 @@ namespace Debugger ICorDebugValue[] args = getArgs(); // TODO: What if this thread is not suitable? - targetThread.CorThread.CreateEval(out corEval); + corEval = targetThread.CorThread.CreateEval(); try { corEval.CallFunction(corFunction, (uint)args.Length, args); @@ -152,9 +152,7 @@ namespace Debugger protected internal virtual void OnEvalComplete(bool successful) { - ICorDebugValue corValue; - corEval.GetResult(out corValue); - result = Value.CreateValue(debugger, corValue); + result = Value.CreateValue(debugger, corEval.Result); if (result == null) { evalState = EvalState.EvaluatedNoResult; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs index 48fa740e64..c40cc9e3e1 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValue.cs @@ -73,9 +73,7 @@ namespace Debugger if (heapValue == null) { // TODO: Investigate return null; } - ICorDebugHandleValue corHandle; - heapValue.CreateHandle(CorDebugHandleType.HANDLE_WEAK_TRACK_RESURRECTION, out corHandle); - return corHandle; + return heapValue.CreateHandle(CorDebugHandleType.HANDLE_WEAK_TRACK_RESURRECTION); } } @@ -99,7 +97,7 @@ namespace Debugger internal unsafe ObjectValue(NDebugger debugger, ICorDebugValue corValue):base(debugger, corValue) { - this.corValue.CastTo().GetClass(out corClass); + corClass = this.corValue.CastTo().Class; InitObjectVariable(); } @@ -111,13 +109,9 @@ namespace Debugger void InitObjectVariable () { - uint classToken; - corClass.GetToken(out classToken); - corClass.GetModule(out corModule); + corModule = corClass.Module; metaData = Module.MetaData; - - classProps = metaData.GetTypeDefProps(classToken); - + classProps = metaData.GetTypeDefProps(corClass.Token); corModuleSuperclass = corModule; } @@ -188,8 +182,7 @@ namespace Debugger Eval CreatePropertyEval(MethodProps method, ValueGetter getter) { - ICorDebugFunction evalCorFunction; - Module.CorModule.GetFunctionFromToken(method.Token, out evalCorFunction); + ICorDebugFunction evalCorFunction = Module.CorModule.GetFunctionFromToken(method.Token); return new Eval(debugger, evalCorFunction, delegate { if (method.IsStatic) { @@ -218,9 +211,9 @@ namespace Debugger try { ICorDebugValue fieldValue; if (field.IsStatic) { - corClass.GetStaticFieldValue(field.Token, curFrame, out fieldValue); + fieldValue = corClass.GetStaticFieldValue(field.Token, curFrame); } else { - (val.CorValue.CastTo()).GetFieldValue(corClass, field.Token, out fieldValue); + fieldValue = (val.CorValue.CastTo()).GetFieldValue(corClass, field.Token); } return Value.CreateValue(debugger, fieldValue); } catch { @@ -297,8 +290,7 @@ namespace Debugger if ((classProps.SuperClassToken & 0x00FFFFFF) == 0) { throw new DebuggerException("Unable to get base class: " + fullTypeName); } else { - ICorDebugClass superClass; - corModuleSuperclass.GetClassFromToken(classProps.SuperClassToken, out superClass); + ICorDebugClass superClass = corModuleSuperclass.GetClassFromToken(classProps.SuperClassToken); return new ObjectValue(debugger, corValue, superClass); } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs index 1bf29d4255..eba2dc306e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/Value.cs @@ -119,9 +119,7 @@ namespace Debugger if (corValue == null) { return (CorElementType)0; } - uint typeRaw; - corValue.GetType(out typeRaw); - return (CorElementType)typeRaw; + return (CorElementType)corValue.Type; } internal static System.Type CorTypeToManagedType(CorElementType corType) @@ -156,17 +154,16 @@ namespace Debugger if (manType == null) return ""; return manType.ToString(); } - - + + internal static ICorDebugValue DereferenceUnbox(ICorDebugValue corValue) { if (corValue.Is()) { - int isNull; - (corValue.CastTo()).IsNull(out isNull); + int isNull = corValue.CastTo().IsNull; if (isNull == 0) { ICorDebugValue dereferencedValue; try { - (corValue.CastTo()).Dereference(out dereferencedValue); + dereferencedValue = (corValue.CastTo()).Dereference(); } catch { // Error during dereferencing return null; @@ -176,13 +173,11 @@ namespace Debugger return null; } } - + if (corValue.Is()) { - ICorDebugObjectValue corUnboxedValue; - (corValue.CastTo()).GetObject(out corUnboxedValue); - return DereferenceUnbox(corUnboxedValue.CastTo()); // Try again + return DereferenceUnbox(corValue.CastTo().Object.CastTo()); // Try again } - + return corValue; } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugClass.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugClass.cs index 5d5a72b6e4..f12ac7ed29 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugClass.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/CorDebugClass.cs @@ -85,32 +85,40 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled); } - public void CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, out ICorDebugProcess ppProcess) + public ICorDebugProcess CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } - public void DebugActiveProcess(uint id, int win32Attach, out ICorDebugProcess ppProcess) + public ICorDebugProcess DebugActiveProcess(uint id, int win32Attach) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } - public void EnumerateProcesses(out ICorDebugProcessEnum ppProcess) + public ICorDebugProcessEnum EnumerateProcesses() { + ICorDebugProcessEnum ppProcess; Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess; this.WrappedObject.EnumerateProcesses(out out_ppProcess); ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess); + return ppProcess; } - public void GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess) + public ICorDebugProcess GetProcess(uint dwProcessId) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } public void Initialize() diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebugClass.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebugClass.cs index 9fe4adbd0e..b14a5f0e6a 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebugClass.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/EmbeddedCLRCorDebugClass.cs @@ -85,32 +85,40 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled); } - public void CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, out ICorDebugProcess ppProcess) + public ICorDebugProcess CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } - public void DebugActiveProcess(uint id, int win32Attach, out ICorDebugProcess ppProcess) + public ICorDebugProcess DebugActiveProcess(uint id, int win32Attach) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } - public void EnumerateProcesses(out ICorDebugProcessEnum ppProcess) + public ICorDebugProcessEnum EnumerateProcesses() { + ICorDebugProcessEnum ppProcess; Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess; this.WrappedObject.EnumerateProcesses(out out_ppProcess); ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess); + return ppProcess; } - public void GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess) + public ICorDebugProcess GetProcess(uint dwProcessId) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } public void Initialize() diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebug.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebug.cs index fe41ae9320..8e466ae479 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebug.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebug.cs @@ -100,32 +100,40 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject); } - public void CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags, out ICorDebugProcess ppProcess) + public ICorDebugProcess CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } - public void DebugActiveProcess(uint id, int win32Attach, out ICorDebugProcess ppProcess) + public ICorDebugProcess DebugActiveProcess(uint id, int win32Attach) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } - public void EnumerateProcesses(out ICorDebugProcessEnum ppProcess) + public ICorDebugProcessEnum EnumerateProcesses() { + ICorDebugProcessEnum ppProcess; Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess; this.WrappedObject.EnumerateProcesses(out out_ppProcess); ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess); + return ppProcess; } - public void GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess) + public ICorDebugProcess GetProcess(uint dwProcessId) { + ICorDebugProcess ppProcess; Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess); ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; } public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain.cs index 5aecadcdbe..7a19a30922 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Continue(fIsOutOfBand); } - public void IsRunning(out int pbRunning) + public int IsRunning { - this.WrappedObject.IsRunning(out pbRunning); + get + { + int pbRunning; + this.WrappedObject.IsRunning(out pbRunning); + return pbRunning; + } } - public void HasQueuedCallbacks(ICorDebugThread pThread, out int pbQueued) + public int HasQueuedCallbacks(ICorDebugThread pThread) { + int pbQueued; this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued); + return pbQueued; } - public void EnumerateThreads(out ICorDebugThreadEnum ppThreads) + public ICorDebugThreadEnum EnumerateThreads() { + ICorDebugThreadEnum ppThreads; Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads; this.WrappedObject.EnumerateThreads(out out_ppThreads); ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads); + return ppThreads; } public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread) @@ -122,62 +131,84 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Terminate(exitCode); } - public void CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError) + public ICorDebugErrorInfoEnum CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) { + ICorDebugErrorInfoEnum pError; Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; } - public void CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError) + public ICorDebugErrorInfoEnum CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) { + ICorDebugErrorInfoEnum pError; Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; } - public void GetProcess(out ICorDebugProcess ppProcess) + public ICorDebugProcess Process { - Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; - this.WrappedObject.GetProcess(out out_ppProcess); - ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } } - public void EnumerateAssemblies(out ICorDebugAssemblyEnum ppAssemblies) + public ICorDebugAssemblyEnum EnumerateAssemblies() { + ICorDebugAssemblyEnum ppAssemblies; Debugger.Interop.CorDebug.ICorDebugAssemblyEnum out_ppAssemblies; this.WrappedObject.EnumerateAssemblies(out out_ppAssemblies); ppAssemblies = ICorDebugAssemblyEnum.Wrap(out_ppAssemblies); + return ppAssemblies; } - public void GetModuleFromMetaDataInterface(object pIMetaData, out ICorDebugModule ppModule) + public ICorDebugModule GetModuleFromMetaDataInterface(object pIMetaData) { + ICorDebugModule ppModule; Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; this.WrappedObject.GetModuleFromMetaDataInterface(pIMetaData, out out_ppModule); ppModule = ICorDebugModule.Wrap(out_ppModule); + return ppModule; } - public void EnumerateBreakpoints(out ICorDebugBreakpointEnum ppBreakpoints) + public ICorDebugBreakpointEnum EnumerateBreakpoints() { + ICorDebugBreakpointEnum ppBreakpoints; Debugger.Interop.CorDebug.ICorDebugBreakpointEnum out_ppBreakpoints; this.WrappedObject.EnumerateBreakpoints(out out_ppBreakpoints); ppBreakpoints = ICorDebugBreakpointEnum.Wrap(out_ppBreakpoints); + return ppBreakpoints; } - public void EnumerateSteppers(out ICorDebugStepperEnum ppSteppers) + public ICorDebugStepperEnum EnumerateSteppers() { + ICorDebugStepperEnum ppSteppers; Debugger.Interop.CorDebug.ICorDebugStepperEnum out_ppSteppers; this.WrappedObject.EnumerateSteppers(out out_ppSteppers); ppSteppers = ICorDebugStepperEnum.Wrap(out_ppSteppers); + return ppSteppers; } - public void IsAttached(out int pbAttached) + public int IsAttached { - this.WrappedObject.IsAttached(out pbAttached); + get + { + int pbAttached; + this.WrappedObject.IsAttached(out pbAttached); + return pbAttached; + } } public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) @@ -185,11 +216,16 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.GetName(cchName, out pcchName, szName); } - public void GetObject(out ICorDebugValue ppObject) + public ICorDebugValue Object { - Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; - this.WrappedObject.GetObject(out out_ppObject); - ppObject = ICorDebugValue.Wrap(out_ppObject); + get + { + ICorDebugValue ppObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugValue.Wrap(out_ppObject); + return ppObject; + } } public void Attach() @@ -197,9 +233,14 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Attach(); } - public void GetID(out uint pId) + public uint ID { - this.WrappedObject.GetID(out pId); + get + { + uint pId; + this.WrappedObject.GetID(out pId); + return pId; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain2.cs index 9c8521b20e..771e7fc7a7 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomain2.cs @@ -80,20 +80,24 @@ namespace Debugger.Wrappers.CorDebug } - public void GetArrayOrPointerType(uint elementType, uint nRank, ICorDebugType pTypeArg, out ICorDebugType ppType) + public ICorDebugType GetArrayOrPointerType(uint elementType, uint nRank, ICorDebugType pTypeArg) { + ICorDebugType ppType; Debugger.Interop.CorDebug.ICorDebugType out_ppType; this.WrappedObject.GetArrayOrPointerType(elementType, nRank, pTypeArg.WrappedObject, out out_ppType); ppType = ICorDebugType.Wrap(out_ppType); + return ppType; } - public void GetFunctionPointerType(uint nTypeArgs, ref ICorDebugType ppTypeArgs, out ICorDebugType ppType) + public ICorDebugType GetFunctionPointerType(uint nTypeArgs, ref ICorDebugType ppTypeArgs) { + ICorDebugType ppType; Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject; Debugger.Interop.CorDebug.ICorDebugType out_ppType; this.WrappedObject.GetFunctionPointerType(nTypeArgs, ref ref_ppTypeArgs, out out_ppType); ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs); ppType = ICorDebugType.Wrap(out_ppType); + return ppType; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomainEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomainEnum.cs index 2e001bc660..7498667e5e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomainEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAppDomainEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr values, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr values) { + uint pceltFetched; this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugArrayValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugArrayValue.cs index f53a96bdee..3425fc56c5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugArrayValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugArrayValue.cs @@ -80,53 +80,92 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void IsValid(out int pbValid) + public int IsValid { - this.WrappedObject.IsValid(out pbValid); + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } } - public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateRelocBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetElementType(out uint pType) + public uint ElementType { - this.WrappedObject.GetElementType(out pType); + get + { + uint pType; + this.WrappedObject.GetElementType(out pType); + return pType; + } } - public void GetRank(out uint pnRank) + public uint Rank { - this.WrappedObject.GetRank(out pnRank); + get + { + uint pnRank; + this.WrappedObject.GetRank(out pnRank); + return pnRank; + } } - public void GetCount(out uint pnCount) + public uint Count { - this.WrappedObject.GetCount(out pnCount); + get + { + uint pnCount; + this.WrappedObject.GetCount(out pnCount); + return pnCount; + } } public void GetDimensions(uint cdim, System.IntPtr dims) @@ -134,9 +173,11 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.GetDimensions(cdim, dims); } - public void HasBaseIndicies(out int pbHasBaseIndicies) + public int HasBaseIndicies() { + int pbHasBaseIndicies; this.WrappedObject.HasBaseIndicies(out pbHasBaseIndicies); + return pbHasBaseIndicies; } public void GetBaseIndicies(uint cdim, System.IntPtr indicies) @@ -144,18 +185,22 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.GetBaseIndicies(cdim, indicies); } - public void GetElement(uint cdim, System.IntPtr indices, out ICorDebugValue ppValue) + public ICorDebugValue GetElement(uint cdim, System.IntPtr indices) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetElement(cdim, indices, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetElementAtPosition(uint nPosition, out ICorDebugValue ppValue) + public ICorDebugValue GetElementAtPosition(uint nPosition) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetElementAtPosition(nPosition, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssembly.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssembly.cs index 023f060cab..4e558c27e6 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssembly.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssembly.cs @@ -80,25 +80,37 @@ namespace Debugger.Wrappers.CorDebug } - public void GetProcess(out ICorDebugProcess ppProcess) + public ICorDebugProcess Process { - Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; - this.WrappedObject.GetProcess(out out_ppProcess); - ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } } - public void GetAppDomain(out ICorDebugAppDomain ppAppDomain) + public ICorDebugAppDomain AppDomain { - Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain; - this.WrappedObject.GetAppDomain(out out_ppAppDomain); - ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain); + get + { + ICorDebugAppDomain ppAppDomain; + Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain; + this.WrappedObject.GetAppDomain(out out_ppAppDomain); + ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain); + return ppAppDomain; + } } - public void EnumerateModules(out ICorDebugModuleEnum ppModules) + public ICorDebugModuleEnum EnumerateModules() { + ICorDebugModuleEnum ppModules; Debugger.Interop.CorDebug.ICorDebugModuleEnum out_ppModules; this.WrappedObject.EnumerateModules(out out_ppModules); ppModules = ICorDebugModuleEnum.Wrap(out_ppModules); + return ppModules; } public void GetCodeBase(uint cchName, out uint pcchName, System.IntPtr szName) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssemblyEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssemblyEnum.cs index c5d100af37..fdcab959ef 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssemblyEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugAssemblyEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr values, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr values) { + uint pceltFetched; this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBoxValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBoxValue.cs index 30146186ef..6b011f1516 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBoxValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBoxValue.cs @@ -80,45 +80,74 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void IsValid(out int pbValid) + public int IsValid { - this.WrappedObject.IsValid(out pbValid); + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } } - public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateRelocBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetObject(out ICorDebugObjectValue ppObject) + public ICorDebugObjectValue Object { - Debugger.Interop.CorDebug.ICorDebugObjectValue out_ppObject; - this.WrappedObject.GetObject(out out_ppObject); - ppObject = ICorDebugObjectValue.Wrap(out_ppObject); + get + { + ICorDebugObjectValue ppObject; + Debugger.Interop.CorDebug.ICorDebugObjectValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugObjectValue.Wrap(out_ppObject); + return ppObject; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpoint.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpoint.cs index daf8d31505..4d2dd278dd 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpoint.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpoint.cs @@ -85,9 +85,14 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Activate(bActive); } - public void IsActive(out int pbActive) + public int IsActive { - this.WrappedObject.IsActive(out pbActive); + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpointEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpointEnum.cs index e6aabf65fe..621c3a2456 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpointEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugBreakpointEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr breakpoints, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr breakpoints) { + uint pceltFetched; this.WrappedObject.Next(celt, breakpoints, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChain.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChain.cs index aca4764b06..c19860d033 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChain.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChain.cs @@ -80,84 +80,138 @@ namespace Debugger.Wrappers.CorDebug } - public void GetThread(out ICorDebugThread ppThread) + public ICorDebugThread Thread { - Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; - this.WrappedObject.GetThread(out out_ppThread); - ppThread = ICorDebugThread.Wrap(out_ppThread); + get + { + ICorDebugThread ppThread; + Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; + this.WrappedObject.GetThread(out out_ppThread); + ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; + } } - public void GetStackRange(out ulong pStart, out ulong pEnd) + public ulong GetStackRange(out ulong pStart) { + ulong pEnd; this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; } - public void GetContext(out ICorDebugContext ppContext) + public ICorDebugContext Context { - Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; - this.WrappedObject.GetContext(out out_ppContext); - ppContext = ICorDebugContext.Wrap(out_ppContext); + get + { + ICorDebugContext ppContext; + Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; + this.WrappedObject.GetContext(out out_ppContext); + ppContext = ICorDebugContext.Wrap(out_ppContext); + return ppContext; + } } - public void GetCaller(out ICorDebugChain ppChain) + public ICorDebugChain Caller { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetCaller(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetCaller(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetCallee(out ICorDebugChain ppChain) + public ICorDebugChain Callee { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetCallee(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetCallee(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetPrevious(out ICorDebugChain ppChain) + public ICorDebugChain Previous { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetPrevious(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetPrevious(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetNext(out ICorDebugChain ppChain) + public ICorDebugChain Next { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetNext(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetNext(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void IsManaged(out int pManaged) + public int IsManaged { - this.WrappedObject.IsManaged(out pManaged); + get + { + int pManaged; + this.WrappedObject.IsManaged(out pManaged); + return pManaged; + } } - public void EnumerateFrames(out ICorDebugFrameEnum ppFrames) + public ICorDebugFrameEnum EnumerateFrames() { + ICorDebugFrameEnum ppFrames; Debugger.Interop.CorDebug.ICorDebugFrameEnum out_ppFrames; this.WrappedObject.EnumerateFrames(out out_ppFrames); ppFrames = ICorDebugFrameEnum.Wrap(out_ppFrames); + return ppFrames; } - public void GetActiveFrame(out ICorDebugFrame ppFrame) + public ICorDebugFrame ActiveFrame { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetActiveFrame(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetActiveFrame(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void GetRegisterSet(out ICorDebugRegisterSet ppRegisters) + public ICorDebugRegisterSet RegisterSet { - Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; - this.WrappedObject.GetRegisterSet(out out_ppRegisters); - ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + get + { + ICorDebugRegisterSet ppRegisters; + Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; + this.WrappedObject.GetRegisterSet(out out_ppRegisters); + ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + return ppRegisters; + } } - public void GetReason(out CorDebugChainReason pReason) + public CorDebugChainReason Reason { - Debugger.Interop.CorDebug.CorDebugChainReason out_pReason; - this.WrappedObject.GetReason(out out_pReason); - pReason = ((CorDebugChainReason)(out_pReason)); + get + { + CorDebugChainReason pReason; + Debugger.Interop.CorDebug.CorDebugChainReason out_pReason; + this.WrappedObject.GetReason(out out_pReason); + pReason = ((CorDebugChainReason)(out_pReason)); + return pReason; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChainEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChainEnum.cs index d45b477ecd..c9b0ad36e9 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChainEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugChainEnum.cs @@ -90,20 +90,28 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, ICorDebugChain[] chains, out uint pceltFetched) + public uint Next(uint celt, ICorDebugChain[] chains) { + uint pceltFetched; Debugger.Interop.CorDebug.ICorDebugChain[] array_chains = new Debugger.Interop.CorDebug.ICorDebugChain[chains.Length]; for (int i = 0; (i < chains.Length); i = (i + 1)) { @@ -123,6 +131,7 @@ namespace Debugger.Wrappers.CorDebug chains[i] = null; } } + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass.cs index 0ab1f9006c..edcbb1356b 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass.cs @@ -80,23 +80,35 @@ namespace Debugger.Wrappers.CorDebug } - public void GetModule(out ICorDebugModule pModule) + public ICorDebugModule Module { - Debugger.Interop.CorDebug.ICorDebugModule out_pModule; - this.WrappedObject.GetModule(out out_pModule); - pModule = ICorDebugModule.Wrap(out_pModule); + get + { + ICorDebugModule pModule; + Debugger.Interop.CorDebug.ICorDebugModule out_pModule; + this.WrappedObject.GetModule(out out_pModule); + pModule = ICorDebugModule.Wrap(out_pModule); + return pModule; + } } - public void GetToken(out uint pTypeDef) + public uint Token { - this.WrappedObject.GetToken(out pTypeDef); + get + { + uint pTypeDef; + this.WrappedObject.GetToken(out pTypeDef); + return pTypeDef; + } } - public void GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame, out ICorDebugValue ppValue) + public ICorDebugValue GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass2.cs index e3e432a65b..2cb4902a3f 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugClass2.cs @@ -80,13 +80,15 @@ namespace Debugger.Wrappers.CorDebug } - public void GetParameterizedType(uint elementType, uint nTypeArgs, ref ICorDebugType ppTypeArgs, out ICorDebugType ppType) + public ICorDebugType GetParameterizedType(uint elementType, uint nTypeArgs, ref ICorDebugType ppTypeArgs) { + ICorDebugType ppType; Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject; Debugger.Interop.CorDebug.ICorDebugType out_ppType; this.WrappedObject.GetParameterizedType(elementType, nTypeArgs, ref ref_ppTypeArgs, out out_ppType); ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs); ppType = ICorDebugType.Wrap(out_ppType); + return ppType; } public void SetJMCStatus(int bIsJustMyCode) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCode.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCode.cs index af0281d200..7315e7017b 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCode.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCode.cs @@ -80,43 +80,72 @@ namespace Debugger.Wrappers.CorDebug } - public void IsIL(out int pbIL) + public int IsIL { - this.WrappedObject.IsIL(out pbIL); + get + { + int pbIL; + this.WrappedObject.IsIL(out pbIL); + return pbIL; + } } - public void GetFunction(out ICorDebugFunction ppFunction) + public ICorDebugFunction Function { - Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; - this.WrappedObject.GetFunction(out out_ppFunction); - ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } } - public void GetAddress(out ulong pStart) + public ulong Address { - this.WrappedObject.GetAddress(out pStart); + get + { + ulong pStart; + this.WrappedObject.GetAddress(out pStart); + return pStart; + } } - public void GetSize(out uint pcBytes) + public uint Size { - this.WrappedObject.GetSize(out pcBytes); + get + { + uint pcBytes; + this.WrappedObject.GetSize(out pcBytes); + return pcBytes; + } } - public void CreateBreakpoint(uint offset, out ICorDebugFunctionBreakpoint ppBreakpoint) + public ICorDebugFunctionBreakpoint CreateBreakpoint(uint offset) { + ICorDebugFunctionBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(offset, out out_ppBreakpoint); ppBreakpoint = ICorDebugFunctionBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetCode(uint startOffset, uint endOffset, uint cBufferAlloc, System.IntPtr buffer, out uint pcBufferSize) + public uint GetCode(uint startOffset, uint endOffset, uint cBufferAlloc, System.IntPtr buffer) { + uint pcBufferSize; this.WrappedObject.GetCode(startOffset, endOffset, cBufferAlloc, buffer, out pcBufferSize); + return pcBufferSize; } - public void GetVersionNumber(out uint nVersion) + public uint VersionNumber { - this.WrappedObject.GetVersionNumber(out nVersion); + get + { + uint nVersion; + this.WrappedObject.GetVersionNumber(out nVersion); + return nVersion; + } } public void GetILToNativeMapping(uint cMap, out uint pcMap, System.IntPtr map) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCodeEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCodeEnum.cs index 3a898b7528..381e79351b 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCodeEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugCodeEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr values, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr values) { + uint pceltFetched; this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugContext.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugContext.cs index 28a31e60d7..eda0880f9e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugContext.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugContext.cs @@ -80,64 +80,105 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetClass(out ICorDebugClass ppClass) + public ICorDebugClass Class { - Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; - this.WrappedObject.GetClass(out out_ppClass); - ppClass = ICorDebugClass.Wrap(out_ppClass); + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } } - public void GetFieldValue(ICorDebugClass pClass, uint fieldDef, out ICorDebugValue ppValue) + public ICorDebugValue GetFieldValue(ICorDebugClass pClass, uint fieldDef) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetFieldValue(pClass.WrappedObject, fieldDef, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetVirtualMethod(uint memberRef, out ICorDebugFunction ppFunction) + public ICorDebugFunction GetVirtualMethod(uint memberRef) { + ICorDebugFunction ppFunction; Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; this.WrappedObject.GetVirtualMethod(memberRef, out out_ppFunction); ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; } - public void GetContext(out ICorDebugContext ppContext) + public ICorDebugContext Context { - Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; - this.WrappedObject.GetContext(out out_ppContext); - ppContext = ICorDebugContext.Wrap(out_ppContext); + get + { + ICorDebugContext ppContext; + Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; + this.WrappedObject.GetContext(out out_ppContext); + ppContext = ICorDebugContext.Wrap(out_ppContext); + return ppContext; + } } - public void IsValueClass(out int pbIsValueClass) + public int IsValueClass { - this.WrappedObject.IsValueClass(out pbIsValueClass); + get + { + int pbIsValueClass; + this.WrappedObject.IsValueClass(out pbIsValueClass); + return pbIsValueClass; + } } - public void GetManagedCopy(out object ppObject) + public object ManagedCopy { - this.WrappedObject.GetManagedCopy(out ppObject); + get + { + object ppObject; + this.WrappedObject.GetManagedCopy(out ppObject); + return ppObject; + } } public void SetFromManagedCopy(object pObject) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugController.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugController.cs index 04f1fff530..ba7abf83f7 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugController.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugController.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Continue(fIsOutOfBand); } - public void IsRunning(out int pbRunning) + public int IsRunning { - this.WrappedObject.IsRunning(out pbRunning); + get + { + int pbRunning; + this.WrappedObject.IsRunning(out pbRunning); + return pbRunning; + } } - public void HasQueuedCallbacks(ICorDebugThread pThread, out int pbQueued) + public int HasQueuedCallbacks(ICorDebugThread pThread) { + int pbQueued; this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued); + return pbQueued; } - public void EnumerateThreads(out ICorDebugThreadEnum ppThreads) + public ICorDebugThreadEnum EnumerateThreads() { + ICorDebugThreadEnum ppThreads; Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads; this.WrappedObject.EnumerateThreads(out out_ppThreads); ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads); + return ppThreads; } public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread) @@ -122,22 +131,26 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Terminate(exitCode); } - public void CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError) + public ICorDebugErrorInfoEnum CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) { + ICorDebugErrorInfoEnum pError; Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; } - public void CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError) + public ICorDebugErrorInfoEnum CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) { + ICorDebugErrorInfoEnum pError; Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEditAndContinueSnapshot.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEditAndContinueSnapshot.cs index d41a1e24e8..4aa35cfba8 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEditAndContinueSnapshot.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEditAndContinueSnapshot.cs @@ -80,24 +80,41 @@ namespace Debugger.Wrappers.CorDebug } - public void CopyMetaData(IStream pIStream, out System.Guid pMvid) + public System.Guid CopyMetaData(IStream pIStream) { + System.Guid pMvid; this.WrappedObject.CopyMetaData(pIStream.WrappedObject, out pMvid); + return pMvid; } - public void GetMvid(out System.Guid pMvid) + public System.Guid Mvid { - this.WrappedObject.GetMvid(out pMvid); + get + { + System.Guid pMvid; + this.WrappedObject.GetMvid(out pMvid); + return pMvid; + } } - public void GetRoDataRVA(out uint pRoDataRVA) + public uint RoDataRVA { - this.WrappedObject.GetRoDataRVA(out pRoDataRVA); + get + { + uint pRoDataRVA; + this.WrappedObject.GetRoDataRVA(out pRoDataRVA); + return pRoDataRVA; + } } - public void GetRwDataRVA(out uint pRwDataRVA) + public uint RwDataRVA { - this.WrappedObject.GetRwDataRVA(out pRwDataRVA); + get + { + uint pRwDataRVA; + this.WrappedObject.GetRwDataRVA(out pRwDataRVA); + return pRwDataRVA; + } } public void SetPEBytes(IStream pIStream) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEnum.cs index 38b62b2c62..623ff8a71c 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEnum.cs @@ -90,16 +90,23 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugErrorInfoEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugErrorInfoEnum.cs index 013cbe3a42..f6f9055a83 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugErrorInfoEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugErrorInfoEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr errors, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr errors) { + uint pceltFetched; this.WrappedObject.Next(celt, errors, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval.cs index 735bfd1b1b..a5a3aea431 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval.cs @@ -125,9 +125,14 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.NewArray(elementType, pElementClass.WrappedObject, rank, ref dims, ref lowBounds); } - public void IsActive(out int pbActive) + public int IsActive { - this.WrappedObject.IsActive(out pbActive); + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } } public void Abort() @@ -135,25 +140,37 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Abort(); } - public void GetResult(out ICorDebugValue ppResult) + public ICorDebugValue Result { - Debugger.Interop.CorDebug.ICorDebugValue out_ppResult; - this.WrappedObject.GetResult(out out_ppResult); - ppResult = ICorDebugValue.Wrap(out_ppResult); + get + { + ICorDebugValue ppResult; + Debugger.Interop.CorDebug.ICorDebugValue out_ppResult; + this.WrappedObject.GetResult(out out_ppResult); + ppResult = ICorDebugValue.Wrap(out_ppResult); + return ppResult; + } } - public void GetThread(out ICorDebugThread ppThread) + public ICorDebugThread Thread { - Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; - this.WrappedObject.GetThread(out out_ppThread); - ppThread = ICorDebugThread.Wrap(out_ppThread); + get + { + ICorDebugThread ppThread; + Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; + this.WrappedObject.GetThread(out out_ppThread); + ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; + } } - public void CreateValue(uint elementType, ICorDebugClass pElementClass, out ICorDebugValue ppValue) + public ICorDebugValue CreateValue(uint elementType, ICorDebugClass pElementClass) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.CreateValue(elementType, pElementClass.WrappedObject, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval2.cs index 2f444caab9..0265648653 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugEval2.cs @@ -89,11 +89,13 @@ namespace Debugger.Wrappers.CorDebug ppArgs = ICorDebugValue.Wrap(ref_ppArgs); } - public void CreateValueForType(ICorDebugType pType, out ICorDebugValue ppValue) + public ICorDebugValue CreateValueForType(ICorDebugType pType) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.CreateValueForType(pType.WrappedObject, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } public void NewParameterizedObject(ICorDebugFunction pConstructor, uint nTypeArgs, ref ICorDebugType ppTypeArgs, uint nArgs, ref ICorDebugValue ppArgs) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrame.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrame.cs index a1691c7586..963f68efcf 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrame.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrame.cs @@ -80,56 +80,90 @@ namespace Debugger.Wrappers.CorDebug } - public void GetChain(out ICorDebugChain ppChain) + public ICorDebugChain Chain { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetChain(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetCode(out ICorDebugCode ppCode) + public ICorDebugCode Code { - Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; - this.WrappedObject.GetCode(out out_ppCode); - ppCode = ICorDebugCode.Wrap(out_ppCode); + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } } - public void GetFunction(out ICorDebugFunction ppFunction) + public ICorDebugFunction Function { - Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; - this.WrappedObject.GetFunction(out out_ppFunction); - ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } } - public void GetFunctionToken(out uint pToken) + public uint FunctionToken { - this.WrappedObject.GetFunctionToken(out pToken); + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } } - public void GetStackRange(out ulong pStart, out ulong pEnd) + public ulong GetStackRange(out ulong pStart) { + ulong pEnd; this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; } - public void GetCaller(out ICorDebugFrame ppFrame) + public ICorDebugFrame Caller { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCaller(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void GetCallee(out ICorDebugFrame ppFrame) + public ICorDebugFrame Callee { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCallee(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void CreateStepper(out ICorDebugStepper ppStepper) + public ICorDebugStepper CreateStepper() { + ICorDebugStepper ppStepper; Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; this.WrappedObject.CreateStepper(out out_ppStepper); ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrameEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrameEnum.cs index e9c230a352..b27b379fac 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrameEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFrameEnum.cs @@ -90,20 +90,28 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, ICorDebugFrame[] frames, out uint pceltFetched) + public uint Next(uint celt, ICorDebugFrame[] frames) { + uint pceltFetched; Debugger.Interop.CorDebug.ICorDebugFrame[] array_frames = new Debugger.Interop.CorDebug.ICorDebugFrame[frames.Length]; for (int i = 0; (i < frames.Length); i = (i + 1)) { @@ -123,6 +131,7 @@ namespace Debugger.Wrappers.CorDebug frames[i] = null; } } + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction.cs index b8ef8e2f38..a3af5155dc 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction.cs @@ -80,54 +80,91 @@ namespace Debugger.Wrappers.CorDebug } - public void GetModule(out ICorDebugModule ppModule) + public ICorDebugModule Module { - Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; - this.WrappedObject.GetModule(out out_ppModule); - ppModule = ICorDebugModule.Wrap(out_ppModule); + get + { + ICorDebugModule ppModule; + Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; + this.WrappedObject.GetModule(out out_ppModule); + ppModule = ICorDebugModule.Wrap(out_ppModule); + return ppModule; + } } - public void GetClass(out ICorDebugClass ppClass) + public ICorDebugClass Class { - Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; - this.WrappedObject.GetClass(out out_ppClass); - ppClass = ICorDebugClass.Wrap(out_ppClass); + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } } - public void GetToken(out uint pMethodDef) + public uint Token { - this.WrappedObject.GetToken(out pMethodDef); + get + { + uint pMethodDef; + this.WrappedObject.GetToken(out pMethodDef); + return pMethodDef; + } } - public void GetILCode(out ICorDebugCode ppCode) + public ICorDebugCode ILCode { - Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; - this.WrappedObject.GetILCode(out out_ppCode); - ppCode = ICorDebugCode.Wrap(out_ppCode); + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetILCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } } - public void GetNativeCode(out ICorDebugCode ppCode) + public ICorDebugCode NativeCode { - Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; - this.WrappedObject.GetNativeCode(out out_ppCode); - ppCode = ICorDebugCode.Wrap(out_ppCode); + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetNativeCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } } - public void CreateBreakpoint(out ICorDebugFunctionBreakpoint ppBreakpoint) + public ICorDebugFunctionBreakpoint CreateBreakpoint() { + ICorDebugFunctionBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugFunctionBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetLocalVarSigToken(out uint pmdSig) + public uint LocalVarSigToken { - this.WrappedObject.GetLocalVarSigToken(out pmdSig); + get + { + uint pmdSig; + this.WrappedObject.GetLocalVarSigToken(out pmdSig); + return pmdSig; + } } - public void GetCurrentVersionNumber(out uint pnCurrentVersion) + public uint CurrentVersionNumber { - this.WrappedObject.GetCurrentVersionNumber(out pnCurrentVersion); + get + { + uint pnCurrentVersion; + this.WrappedObject.GetCurrentVersionNumber(out pnCurrentVersion); + return pnCurrentVersion; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction2.cs index ccf9c4e32e..d47cfe9bad 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunction2.cs @@ -85,21 +85,33 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetJMCStatus(bIsJustMyCode); } - public void GetJMCStatus(out int pbIsJustMyCode) + public int JMCStatus { - this.WrappedObject.GetJMCStatus(out pbIsJustMyCode); + get + { + int pbIsJustMyCode; + this.WrappedObject.GetJMCStatus(out pbIsJustMyCode); + return pbIsJustMyCode; + } } - public void EnumerateNativeCode(out ICorDebugCodeEnum ppCodeEnum) + public ICorDebugCodeEnum EnumerateNativeCode() { + ICorDebugCodeEnum ppCodeEnum; Debugger.Interop.CorDebug.ICorDebugCodeEnum out_ppCodeEnum; this.WrappedObject.EnumerateNativeCode(out out_ppCodeEnum); ppCodeEnum = ICorDebugCodeEnum.Wrap(out_ppCodeEnum); + return ppCodeEnum; } - public void GetVersionNumber(out uint pnVersion) + public uint VersionNumber { - this.WrappedObject.GetVersionNumber(out pnVersion); + get + { + uint pnVersion; + this.WrappedObject.GetVersionNumber(out pnVersion); + return pnVersion; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunctionBreakpoint.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunctionBreakpoint.cs index 9af77e481c..3951681944 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunctionBreakpoint.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugFunctionBreakpoint.cs @@ -85,21 +85,36 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Activate(bActive); } - public void IsActive(out int pbActive) + public int IsActive { - this.WrappedObject.IsActive(out pbActive); + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } } - public void GetFunction(out ICorDebugFunction ppFunction) + public ICorDebugFunction Function { - Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; - this.WrappedObject.GetFunction(out out_ppFunction); - ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } } - public void GetOffset(out uint pnOffset) + public uint Offset { - this.WrappedObject.GetOffset(out pnOffset); + get + { + uint pnOffset; + this.WrappedObject.GetOffset(out pnOffset); + return pnOffset; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugGenericValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugGenericValue.cs index 40c6d8f577..29774b747e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugGenericValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugGenericValue.cs @@ -80,26 +80,43 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } public void GetValue(System.IntPtr pTo) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHandleValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHandleValue.cs index b8f396aeaf..d28170fe58 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHandleValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHandleValue.cs @@ -80,36 +80,63 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void IsNull(out int pbNull) + public int IsNull { - this.WrappedObject.IsNull(out pbNull); + get + { + int pbNull; + this.WrappedObject.IsNull(out pbNull); + return pbNull; + } } - public void GetValue(out ulong pValue) + public ulong Value { - this.WrappedObject.GetValue(out pValue); + get + { + ulong pValue; + this.WrappedObject.GetValue(out pValue); + return pValue; + } } public void SetValue(ulong value) @@ -117,25 +144,34 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetValue(value); } - public void Dereference(out ICorDebugValue ppValue) + public ICorDebugValue Dereference() { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.Dereference(out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void DereferenceStrong(out ICorDebugValue ppValue) + public ICorDebugValue DereferenceStrong() { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.DereferenceStrong(out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetHandleType(out CorDebugHandleType pType) + public CorDebugHandleType HandleType { - Debugger.Interop.CorDebug.CorDebugHandleType out_pType; - this.WrappedObject.GetHandleType(out out_pType); - pType = ((CorDebugHandleType)(out_pType)); + get + { + CorDebugHandleType pType; + Debugger.Interop.CorDebug.CorDebugHandleType out_pType; + this.WrappedObject.GetHandleType(out out_pType); + pType = ((CorDebugHandleType)(out_pType)); + return pType; + } } public void Dispose() diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue.cs index 8d36cf91b6..7d4ad3b3ec 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue.cs @@ -80,38 +80,62 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void IsValid(out int pbValid) + public int IsValid { - this.WrappedObject.IsValid(out pbValid); + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } } - public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateRelocBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue2.cs index 8ffb825b71..b59f13eb2e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugHeapValue2.cs @@ -80,11 +80,13 @@ namespace Debugger.Wrappers.CorDebug } - public void CreateHandle(CorDebugHandleType type, out ICorDebugHandleValue ppHandle) + public ICorDebugHandleValue CreateHandle(CorDebugHandleType type) { + ICorDebugHandleValue ppHandle; Debugger.Interop.CorDebug.ICorDebugHandleValue out_ppHandle; this.WrappedObject.CreateHandle(((Debugger.Interop.CorDebug.CorDebugHandleType)(type)), out out_ppHandle); ppHandle = ICorDebugHandleValue.Wrap(out_ppHandle); + return ppHandle; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame.cs index bf6e1f9eed..1103c25bb2 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame.cs @@ -80,63 +80,99 @@ namespace Debugger.Wrappers.CorDebug } - public void GetChain(out ICorDebugChain ppChain) + public ICorDebugChain Chain { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetChain(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetCode(out ICorDebugCode ppCode) + public ICorDebugCode Code { - Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; - this.WrappedObject.GetCode(out out_ppCode); - ppCode = ICorDebugCode.Wrap(out_ppCode); + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } } - public void GetFunction(out ICorDebugFunction ppFunction) + public ICorDebugFunction Function { - Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; - this.WrappedObject.GetFunction(out out_ppFunction); - ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } } - public void GetFunctionToken(out uint pToken) + public uint FunctionToken { - this.WrappedObject.GetFunctionToken(out pToken); + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } } - public void GetStackRange(out ulong pStart, out ulong pEnd) + public ulong GetStackRange(out ulong pStart) { + ulong pEnd; this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; } - public void GetCaller(out ICorDebugFrame ppFrame) + public ICorDebugFrame Caller { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCaller(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void GetCallee(out ICorDebugFrame ppFrame) + public ICorDebugFrame Callee { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCallee(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void CreateStepper(out ICorDebugStepper ppStepper) + public ICorDebugStepper CreateStepper() { + ICorDebugStepper ppStepper; Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; this.WrappedObject.CreateStepper(out out_ppStepper); ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; } - public void GetIP(out uint pnOffset, out CorDebugMappingResult pMappingResult) + public CorDebugMappingResult GetIP(out uint pnOffset) { + CorDebugMappingResult pMappingResult; Debugger.Interop.CorDebug.CorDebugMappingResult out_pMappingResult; this.WrappedObject.GetIP(out pnOffset, out out_pMappingResult); pMappingResult = ((CorDebugMappingResult)(out_pMappingResult)); + return pMappingResult; } public void SetIP(uint nOffset) @@ -144,44 +180,59 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetIP(nOffset); } - public void EnumerateLocalVariables(out ICorDebugValueEnum ppValueEnum) + public ICorDebugValueEnum EnumerateLocalVariables() { + ICorDebugValueEnum ppValueEnum; Debugger.Interop.CorDebug.ICorDebugValueEnum out_ppValueEnum; this.WrappedObject.EnumerateLocalVariables(out out_ppValueEnum); ppValueEnum = ICorDebugValueEnum.Wrap(out_ppValueEnum); + return ppValueEnum; } - public void GetLocalVariable(uint dwIndex, out ICorDebugValue ppValue) + public ICorDebugValue GetLocalVariable(uint dwIndex) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetLocalVariable(dwIndex, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void EnumerateArguments(out ICorDebugValueEnum ppValueEnum) + public ICorDebugValueEnum EnumerateArguments() { + ICorDebugValueEnum ppValueEnum; Debugger.Interop.CorDebug.ICorDebugValueEnum out_ppValueEnum; this.WrappedObject.EnumerateArguments(out out_ppValueEnum); ppValueEnum = ICorDebugValueEnum.Wrap(out_ppValueEnum); + return ppValueEnum; } - public void GetArgument(uint dwIndex, out ICorDebugValue ppValue) + public ICorDebugValue GetArgument(uint dwIndex) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetArgument(dwIndex, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetStackDepth(out uint pDepth) + public uint StackDepth { - this.WrappedObject.GetStackDepth(out pDepth); + get + { + uint pDepth; + this.WrappedObject.GetStackDepth(out pDepth); + return pDepth; + } } - public void GetStackValue(uint dwIndex, out ICorDebugValue ppValue) + public ICorDebugValue GetStackValue(uint dwIndex) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetStackValue(dwIndex, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } public void CanSetIP(uint nOffset) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame2.cs index 92ab3bfebe..bd591292cc 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugILFrame2.cs @@ -85,11 +85,13 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.RemapFunction(newILOffset); } - public void EnumerateTypeParameters(out ICorDebugTypeEnum ppTyParEnum) + public ICorDebugTypeEnum EnumerateTypeParameters() { + ICorDebugTypeEnum ppTyParEnum; Debugger.Interop.CorDebug.ICorDebugTypeEnum out_ppTyParEnum; this.WrappedObject.EnumerateTypeParameters(out out_ppTyParEnum); ppTyParEnum = ICorDebugTypeEnum.Wrap(out_ppTyParEnum); + return ppTyParEnum; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugInternalFrame.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugInternalFrame.cs index 8d6387ea3d..454d644d1e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugInternalFrame.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugInternalFrame.cs @@ -80,63 +80,102 @@ namespace Debugger.Wrappers.CorDebug } - public void GetChain(out ICorDebugChain ppChain) + public ICorDebugChain Chain { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetChain(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetCode(out ICorDebugCode ppCode) + public ICorDebugCode Code { - Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; - this.WrappedObject.GetCode(out out_ppCode); - ppCode = ICorDebugCode.Wrap(out_ppCode); + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } } - public void GetFunction(out ICorDebugFunction ppFunction) + public ICorDebugFunction Function { - Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; - this.WrappedObject.GetFunction(out out_ppFunction); - ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } } - public void GetFunctionToken(out uint pToken) + public uint FunctionToken { - this.WrappedObject.GetFunctionToken(out pToken); + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } } - public void GetStackRange(out ulong pStart, out ulong pEnd) + public ulong GetStackRange(out ulong pStart) { + ulong pEnd; this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; } - public void GetCaller(out ICorDebugFrame ppFrame) + public ICorDebugFrame Caller { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCaller(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void GetCallee(out ICorDebugFrame ppFrame) + public ICorDebugFrame Callee { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCallee(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void CreateStepper(out ICorDebugStepper ppStepper) + public ICorDebugStepper CreateStepper() { + ICorDebugStepper ppStepper; Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; this.WrappedObject.CreateStepper(out out_ppStepper); ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; } - public void GetFrameType(out CorDebugInternalFrameType pType) + public CorDebugInternalFrameType FrameType { - Debugger.Interop.CorDebug.CorDebugInternalFrameType out_pType; - this.WrappedObject.GetFrameType(out out_pType); - pType = ((CorDebugInternalFrameType)(out_pType)); + get + { + CorDebugInternalFrameType pType; + Debugger.Interop.CorDebug.CorDebugInternalFrameType out_pType; + this.WrappedObject.GetFrameType(out out_pType); + pType = ((CorDebugInternalFrameType)(out_pType)); + return pType; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugMDA.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugMDA.cs index 10955e912b..247aea14de 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugMDA.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugMDA.cs @@ -102,9 +102,14 @@ namespace Debugger.Wrappers.CorDebug pFlags = ((CorDebugMDAFlags)(ref_pFlags)); } - public void GetOSThreadId(out uint pOsTid) + public uint OSThreadId { - this.WrappedObject.GetOSThreadId(out pOsTid); + get + { + uint pOsTid; + this.WrappedObject.GetOSThreadId(out pOsTid); + return pOsTid; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule.cs index 0d4d9bfd13..e853e959d5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule.cs @@ -80,23 +80,38 @@ namespace Debugger.Wrappers.CorDebug } - public void GetProcess(out ICorDebugProcess ppProcess) + public ICorDebugProcess Process { - Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; - this.WrappedObject.GetProcess(out out_ppProcess); - ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } } - public void GetBaseAddress(out ulong pAddress) + public ulong BaseAddress { - this.WrappedObject.GetBaseAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetBaseAddress(out pAddress); + return pAddress; + } } - public void GetAssembly(out ICorDebugAssembly ppAssembly) + public ICorDebugAssembly Assembly { - Debugger.Interop.CorDebug.ICorDebugAssembly out_ppAssembly; - this.WrappedObject.GetAssembly(out out_ppAssembly); - ppAssembly = ICorDebugAssembly.Wrap(out_ppAssembly); + get + { + ICorDebugAssembly ppAssembly; + Debugger.Interop.CorDebug.ICorDebugAssembly out_ppAssembly; + this.WrappedObject.GetAssembly(out out_ppAssembly); + ppAssembly = ICorDebugAssembly.Wrap(out_ppAssembly); + return ppAssembly; + } } public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) @@ -114,71 +129,108 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.EnableClassLoadCallbacks(bClassLoadCallbacks); } - public void GetFunctionFromToken(uint methodDef, out ICorDebugFunction ppFunction) + public ICorDebugFunction GetFunctionFromToken(uint methodDef) { + ICorDebugFunction ppFunction; Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; this.WrappedObject.GetFunctionFromToken(methodDef, out out_ppFunction); ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; } - public void GetFunctionFromRVA(ulong rva, out ICorDebugFunction ppFunction) + public ICorDebugFunction GetFunctionFromRVA(ulong rva) { + ICorDebugFunction ppFunction; Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; this.WrappedObject.GetFunctionFromRVA(rva, out out_ppFunction); ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; } - public void GetClassFromToken(uint typeDef, out ICorDebugClass ppClass) + public ICorDebugClass GetClassFromToken(uint typeDef) { + ICorDebugClass ppClass; Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; this.WrappedObject.GetClassFromToken(typeDef, out out_ppClass); ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; } - public void CreateBreakpoint(out ICorDebugModuleBreakpoint ppBreakpoint) + public ICorDebugModuleBreakpoint CreateBreakpoint() { + ICorDebugModuleBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugModuleBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetEditAndContinueSnapshot(out ICorDebugEditAndContinueSnapshot ppEditAndContinueSnapshot) + public ICorDebugEditAndContinueSnapshot EditAndContinueSnapshot { - Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot out_ppEditAndContinueSnapshot; - this.WrappedObject.GetEditAndContinueSnapshot(out out_ppEditAndContinueSnapshot); - ppEditAndContinueSnapshot = ICorDebugEditAndContinueSnapshot.Wrap(out_ppEditAndContinueSnapshot); + get + { + ICorDebugEditAndContinueSnapshot ppEditAndContinueSnapshot; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot out_ppEditAndContinueSnapshot; + this.WrappedObject.GetEditAndContinueSnapshot(out out_ppEditAndContinueSnapshot); + ppEditAndContinueSnapshot = ICorDebugEditAndContinueSnapshot.Wrap(out_ppEditAndContinueSnapshot); + return ppEditAndContinueSnapshot; + } } - public void GetMetaDataInterface(ref System.Guid riid, out object ppObj) + public object GetMetaDataInterface(ref System.Guid riid) { + object ppObj; this.WrappedObject.GetMetaDataInterface(ref riid, out ppObj); + return ppObj; } - public void GetToken(out uint pToken) + public uint Token { - this.WrappedObject.GetToken(out pToken); + get + { + uint pToken; + this.WrappedObject.GetToken(out pToken); + return pToken; + } } - public void IsDynamic(out int pDynamic) + public int IsDynamic { - this.WrappedObject.IsDynamic(out pDynamic); + get + { + int pDynamic; + this.WrappedObject.IsDynamic(out pDynamic); + return pDynamic; + } } - public void GetGlobalVariableValue(uint fieldDef, out ICorDebugValue ppValue) + public ICorDebugValue GetGlobalVariableValue(uint fieldDef) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetGlobalVariableValue(fieldDef, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetSize(out uint pcBytes) + public uint Size { - this.WrappedObject.GetSize(out pcBytes); + get + { + uint pcBytes; + this.WrappedObject.GetSize(out pcBytes); + return pcBytes; + } } - public void IsInMemory(out int pInMemory) + public int IsInMemory { - this.WrappedObject.IsInMemory(out pInMemory); + get + { + int pInMemory; + this.WrappedObject.IsInMemory(out pInMemory); + return pInMemory; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule2.cs index 5e46e3172e..a60520fd14 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModule2.cs @@ -95,9 +95,14 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetJITCompilerFlags(dwFlags); } - public void GetJITCompilerFlags(out uint pdwFlags) + public uint JITCompilerFlags { - this.WrappedObject.GetJITCompilerFlags(out pdwFlags); + get + { + uint pdwFlags; + this.WrappedObject.GetJITCompilerFlags(out pdwFlags); + return pdwFlags; + } } public void ResolveAssembly(uint tkAssemblyRef, ref ICorDebugAssembly ppAssembly) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleBreakpoint.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleBreakpoint.cs index 6c8bf148b0..4d10bcc064 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleBreakpoint.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleBreakpoint.cs @@ -85,16 +85,26 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Activate(bActive); } - public void IsActive(out int pbActive) + public int IsActive { - this.WrappedObject.IsActive(out pbActive); + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } } - public void GetModule(out ICorDebugModule ppModule) + public ICorDebugModule Module { - Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; - this.WrappedObject.GetModule(out out_ppModule); - ppModule = ICorDebugModule.Wrap(out_ppModule); + get + { + ICorDebugModule ppModule; + Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; + this.WrappedObject.GetModule(out out_ppModule); + ppModule = ICorDebugModule.Wrap(out_ppModule); + return ppModule; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleEnum.cs index 0b00c5f068..57f5adc5ad 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugModuleEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr modules, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr modules) { + uint pceltFetched; this.WrappedObject.Next(celt, modules, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugNativeFrame.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugNativeFrame.cs index 6ca0ef519d..5cfd641e8e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugNativeFrame.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugNativeFrame.cs @@ -80,61 +80,100 @@ namespace Debugger.Wrappers.CorDebug } - public void GetChain(out ICorDebugChain ppChain) + public ICorDebugChain Chain { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetChain(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetCode(out ICorDebugCode ppCode) + public ICorDebugCode Code { - Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; - this.WrappedObject.GetCode(out out_ppCode); - ppCode = ICorDebugCode.Wrap(out_ppCode); + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } } - public void GetFunction(out ICorDebugFunction ppFunction) + public ICorDebugFunction Function { - Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; - this.WrappedObject.GetFunction(out out_ppFunction); - ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } } - public void GetFunctionToken(out uint pToken) + public uint FunctionToken { - this.WrappedObject.GetFunctionToken(out pToken); + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } } - public void GetStackRange(out ulong pStart, out ulong pEnd) + public ulong GetStackRange(out ulong pStart) { + ulong pEnd; this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; } - public void GetCaller(out ICorDebugFrame ppFrame) + public ICorDebugFrame Caller { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCaller(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void GetCallee(out ICorDebugFrame ppFrame) + public ICorDebugFrame Callee { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetCallee(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void CreateStepper(out ICorDebugStepper ppStepper) + public ICorDebugStepper CreateStepper() { + ICorDebugStepper ppStepper; Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; this.WrappedObject.CreateStepper(out out_ppStepper); ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; } - public void GetIP(out uint pnOffset) + public uint IP { - this.WrappedObject.GetIP(out pnOffset); + get + { + uint pnOffset; + this.WrappedObject.GetIP(out pnOffset); + return pnOffset; + } } public void SetIP(uint nOffset) @@ -142,46 +181,61 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetIP(nOffset); } - public void GetRegisterSet(out ICorDebugRegisterSet ppRegisters) + public ICorDebugRegisterSet RegisterSet { - Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; - this.WrappedObject.GetRegisterSet(out out_ppRegisters); - ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + get + { + ICorDebugRegisterSet ppRegisters; + Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; + this.WrappedObject.GetRegisterSet(out out_ppRegisters); + ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + return ppRegisters; + } } - public void GetLocalRegisterValue(CorDebugRegister reg, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue) + public ICorDebugValue GetLocalRegisterValue(CorDebugRegister reg, uint cbSigBlob, uint pvSigBlob) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetLocalRegisterValue(((Debugger.Interop.CorDebug.CorDebugRegister)(reg)), cbSigBlob, pvSigBlob, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetLocalDoubleRegisterValue(CorDebugRegister highWordReg, CorDebugRegister lowWordReg, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue) + public ICorDebugValue GetLocalDoubleRegisterValue(CorDebugRegister highWordReg, CorDebugRegister lowWordReg, uint cbSigBlob, uint pvSigBlob) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetLocalDoubleRegisterValue(((Debugger.Interop.CorDebug.CorDebugRegister)(highWordReg)), ((Debugger.Interop.CorDebug.CorDebugRegister)(lowWordReg)), cbSigBlob, pvSigBlob, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetLocalMemoryValue(ulong address, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue) + public ICorDebugValue GetLocalMemoryValue(ulong address, uint cbSigBlob, uint pvSigBlob) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetLocalMemoryValue(address, cbSigBlob, pvSigBlob, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetLocalRegisterMemoryValue(CorDebugRegister highWordReg, ulong lowWordAddress, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue) + public ICorDebugValue GetLocalRegisterMemoryValue(CorDebugRegister highWordReg, ulong lowWordAddress, uint cbSigBlob, uint pvSigBlob) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetLocalRegisterMemoryValue(((Debugger.Interop.CorDebug.CorDebugRegister)(highWordReg)), lowWordAddress, cbSigBlob, pvSigBlob, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetLocalMemoryRegisterValue(ulong highWordAddress, CorDebugRegister lowWordRegister, uint cbSigBlob, uint pvSigBlob, out ICorDebugValue ppValue) + public ICorDebugValue GetLocalMemoryRegisterValue(ulong highWordAddress, CorDebugRegister lowWordRegister, uint cbSigBlob, uint pvSigBlob) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetLocalMemoryRegisterValue(highWordAddress, ((Debugger.Interop.CorDebug.CorDebugRegister)(lowWordRegister)), cbSigBlob, pvSigBlob, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } public void CanSetIP(uint nOffset) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectEnum.cs index def1dea785..71b0b195ee 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr objects, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr objects) { + uint pceltFetched; this.WrappedObject.Next(celt, objects, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue.cs index a2d508874c..7870995b17 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue.cs @@ -80,64 +80,105 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetClass(out ICorDebugClass ppClass) + public ICorDebugClass Class { - Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; - this.WrappedObject.GetClass(out out_ppClass); - ppClass = ICorDebugClass.Wrap(out_ppClass); + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } } - public void GetFieldValue(ICorDebugClass pClass, uint fieldDef, out ICorDebugValue ppValue) + public ICorDebugValue GetFieldValue(ICorDebugClass pClass, uint fieldDef) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetFieldValue(pClass.WrappedObject, fieldDef, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetVirtualMethod(uint memberRef, out ICorDebugFunction ppFunction) + public ICorDebugFunction GetVirtualMethod(uint memberRef) { + ICorDebugFunction ppFunction; Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; this.WrappedObject.GetVirtualMethod(memberRef, out out_ppFunction); ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; } - public void GetContext(out ICorDebugContext ppContext) + public ICorDebugContext Context { - Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; - this.WrappedObject.GetContext(out out_ppContext); - ppContext = ICorDebugContext.Wrap(out_ppContext); + get + { + ICorDebugContext ppContext; + Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; + this.WrappedObject.GetContext(out out_ppContext); + ppContext = ICorDebugContext.Wrap(out_ppContext); + return ppContext; + } } - public void IsValueClass(out int pbIsValueClass) + public int IsValueClass { - this.WrappedObject.IsValueClass(out pbIsValueClass); + get + { + int pbIsValueClass; + this.WrappedObject.IsValueClass(out pbIsValueClass); + return pbIsValueClass; + } } - public void GetManagedCopy(out object ppObject) + public object ManagedCopy { - this.WrappedObject.GetManagedCopy(out ppObject); + get + { + object ppObject; + this.WrappedObject.GetManagedCopy(out ppObject); + return ppObject; + } } public void SetFromManagedCopy(object pObject) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue2.cs index 0cf649e423..02418fd912 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugObjectValue2.cs @@ -80,13 +80,15 @@ namespace Debugger.Wrappers.CorDebug } - public void GetVirtualMethodAndType(uint memberRef, out ICorDebugFunction ppFunction, out ICorDebugType ppType) + public ICorDebugType GetVirtualMethodAndType(uint memberRef, out ICorDebugFunction ppFunction) { + ICorDebugType ppType; Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; Debugger.Interop.CorDebug.ICorDebugType out_ppType; this.WrappedObject.GetVirtualMethodAndType(memberRef, out out_ppFunction, out out_ppType); ppFunction = ICorDebugFunction.Wrap(out_ppFunction); ppType = ICorDebugType.Wrap(out_ppType); + return ppType; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess.cs index 12645ecc91..64766ef209 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Continue(fIsOutOfBand); } - public void IsRunning(out int pbRunning) + public int IsRunning { - this.WrappedObject.IsRunning(out pbRunning); + get + { + int pbRunning; + this.WrappedObject.IsRunning(out pbRunning); + return pbRunning; + } } - public void HasQueuedCallbacks(ICorDebugThread pThread, out int pbQueued) + public int HasQueuedCallbacks(ICorDebugThread pThread) { + int pbQueued; this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued); + return pbQueued; } - public void EnumerateThreads(out ICorDebugThreadEnum ppThreads) + public ICorDebugThreadEnum EnumerateThreads() { + ICorDebugThreadEnum ppThreads; Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads; this.WrappedObject.EnumerateThreads(out out_ppThreads); ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads); + return ppThreads; } public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread) @@ -122,56 +131,78 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Terminate(exitCode); } - public void CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError) + public ICorDebugErrorInfoEnum CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) { + ICorDebugErrorInfoEnum pError; Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; } - public void CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots, out ICorDebugErrorInfoEnum pError) + public ICorDebugErrorInfoEnum CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) { + ICorDebugErrorInfoEnum pError; Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; } - public void GetID(out uint pdwProcessId) + public uint ID { - this.WrappedObject.GetID(out pdwProcessId); + get + { + uint pdwProcessId; + this.WrappedObject.GetID(out pdwProcessId); + return pdwProcessId; + } } - public void GetHandle(out uint phProcessHandle) + public uint Handle { - this.WrappedObject.GetHandle(out phProcessHandle); + get + { + uint phProcessHandle; + this.WrappedObject.GetHandle(out phProcessHandle); + return phProcessHandle; + } } - public void GetThread(uint dwThreadId, out ICorDebugThread ppThread) + public ICorDebugThread GetThread(uint dwThreadId) { + ICorDebugThread ppThread; Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; this.WrappedObject.GetThread(dwThreadId, out out_ppThread); ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; } - public void EnumerateObjects(out ICorDebugObjectEnum ppObjects) + public ICorDebugObjectEnum EnumerateObjects() { + ICorDebugObjectEnum ppObjects; Debugger.Interop.CorDebug.ICorDebugObjectEnum out_ppObjects; this.WrappedObject.EnumerateObjects(out out_ppObjects); ppObjects = ICorDebugObjectEnum.Wrap(out_ppObjects); + return ppObjects; } - public void IsTransitionStub(ulong address, out int pbTransitionStub) + public int IsTransitionStub(ulong address) { + int pbTransitionStub; this.WrappedObject.IsTransitionStub(address, out pbTransitionStub); + return pbTransitionStub; } - public void IsOSSuspended(uint threadID, out int pbSuspended) + public int IsOSSuspended(uint threadID) { + int pbSuspended; this.WrappedObject.IsOSSuspended(threadID, out pbSuspended); + return pbSuspended; } public void GetThreadContext(uint threadID, uint contextSize, System.IntPtr context) @@ -184,14 +215,18 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetThreadContext(threadID, contextSize, context); } - public void ReadMemory(ulong address, uint size, System.IntPtr buffer, out uint read) + public uint ReadMemory(ulong address, uint size, System.IntPtr buffer) { + uint read; this.WrappedObject.ReadMemory(address, size, buffer, out read); + return read; } - public void WriteMemory(ulong address, uint size, ref byte buffer, out uint written) + public uint WriteMemory(ulong address, uint size, ref byte buffer) { + uint written; this.WrappedObject.WriteMemory(address, size, ref buffer, out written); + return written; } public void ClearCurrentException(uint threadID) @@ -209,30 +244,44 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.ModifyLogSwitch(ref pLogSwitchName, lLevel); } - public void EnumerateAppDomains(out ICorDebugAppDomainEnum ppAppDomains) + public ICorDebugAppDomainEnum EnumerateAppDomains() { + ICorDebugAppDomainEnum ppAppDomains; Debugger.Interop.CorDebug.ICorDebugAppDomainEnum out_ppAppDomains; this.WrappedObject.EnumerateAppDomains(out out_ppAppDomains); ppAppDomains = ICorDebugAppDomainEnum.Wrap(out_ppAppDomains); + return ppAppDomains; } - public void GetObject(out ICorDebugValue ppObject) + public ICorDebugValue Object { - Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; - this.WrappedObject.GetObject(out out_ppObject); - ppObject = ICorDebugValue.Wrap(out_ppObject); + get + { + ICorDebugValue ppObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugValue.Wrap(out_ppObject); + return ppObject; + } } - public void ThreadForFiberCookie(uint fiberCookie, out ICorDebugThread ppThread) + public ICorDebugThread ThreadForFiberCookie(uint fiberCookie) { + ICorDebugThread ppThread; Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; this.WrappedObject.ThreadForFiberCookie(fiberCookie, out out_ppThread); ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; } - public void GetHelperThreadID(out uint pThreadID) + public uint HelperThreadID { - this.WrappedObject.GetHelperThreadID(out pThreadID); + get + { + uint pThreadID; + this.WrappedObject.GetHelperThreadID(out pThreadID); + return pThreadID; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess2.cs index c073b26cfe..f8e59c1955 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcess2.cs @@ -80,21 +80,30 @@ namespace Debugger.Wrappers.CorDebug } - public void GetThreadForTaskID(ulong taskid, out ICorDebugThread2 ppThread) + public ICorDebugThread2 GetThreadForTaskID(ulong taskid) { + ICorDebugThread2 ppThread; Debugger.Interop.CorDebug.ICorDebugThread2 out_ppThread; this.WrappedObject.GetThreadForTaskID(taskid, out out_ppThread); ppThread = ICorDebugThread2.Wrap(out_ppThread); + return ppThread; } - public void GetVersion(out Debugger.Interop.CorDebug._COR_VERSION version) + public Debugger.Interop.CorDebug._COR_VERSION Version { - this.WrappedObject.GetVersion(out version); + get + { + Debugger.Interop.CorDebug._COR_VERSION version; + this.WrappedObject.GetVersion(out version); + return version; + } } - public void SetUnmanagedBreakpoint(ulong address, uint bufsize, System.IntPtr buffer, out uint bufLen) + public uint SetUnmanagedBreakpoint(ulong address, uint bufsize, System.IntPtr buffer) { + uint bufLen; this.WrappedObject.SetUnmanagedBreakpoint(address, bufsize, buffer, out bufLen); + return bufLen; } public void ClearUnmanagedBreakpoint(ulong address) @@ -107,16 +116,23 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetDesiredNGENCompilerFlags(pdwFlags); } - public void GetDesiredNGENCompilerFlags(out uint pdwFlags) + public uint DesiredNGENCompilerFlags { - this.WrappedObject.GetDesiredNGENCompilerFlags(out pdwFlags); + get + { + uint pdwFlags; + this.WrappedObject.GetDesiredNGENCompilerFlags(out pdwFlags); + return pdwFlags; + } } - public void GetReferenceValueFromGCHandle(uint handle, out ICorDebugReferenceValue pOutValue) + public ICorDebugReferenceValue GetReferenceValueFromGCHandle(uint handle) { + ICorDebugReferenceValue pOutValue; Debugger.Interop.CorDebug.ICorDebugReferenceValue out_pOutValue; this.WrappedObject.GetReferenceValueFromGCHandle(handle, out out_pOutValue); pOutValue = ICorDebugReferenceValue.Wrap(out_pOutValue); + return pOutValue; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcessEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcessEnum.cs index 138428f882..85e7806b0f 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcessEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugProcessEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr processes, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr processes) { + uint pceltFetched; this.WrappedObject.Next(celt, processes, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugReferenceValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugReferenceValue.cs index fc7f8151b1..e2fb25a131 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugReferenceValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugReferenceValue.cs @@ -80,36 +80,63 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void IsNull(out int pbNull) + public int IsNull { - this.WrappedObject.IsNull(out pbNull); + get + { + int pbNull; + this.WrappedObject.IsNull(out pbNull); + return pbNull; + } } - public void GetValue(out ulong pValue) + public ulong Value { - this.WrappedObject.GetValue(out pValue); + get + { + ulong pValue; + this.WrappedObject.GetValue(out pValue); + return pValue; + } } public void SetValue(ulong value) @@ -117,18 +144,22 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetValue(value); } - public void Dereference(out ICorDebugValue ppValue) + public ICorDebugValue Dereference() { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.Dereference(out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void DereferenceStrong(out ICorDebugValue ppValue) + public ICorDebugValue DereferenceStrong() { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.DereferenceStrong(out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugRegisterSet.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugRegisterSet.cs index 82740e2a9e..1502ee87d2 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugRegisterSet.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugRegisterSet.cs @@ -80,9 +80,14 @@ namespace Debugger.Wrappers.CorDebug } - public void GetRegistersAvailable(out ulong pAvailable) + public ulong RegistersAvailable { - this.WrappedObject.GetRegistersAvailable(out pAvailable); + get + { + ulong pAvailable; + this.WrappedObject.GetRegistersAvailable(out pAvailable); + return pAvailable; + } } public void GetRegisters(ulong mask, uint regCount, System.IntPtr regBuffer) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper.cs index 430ea5ba68..8ae00e1d36 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepper.cs @@ -80,9 +80,14 @@ namespace Debugger.Wrappers.CorDebug } - public void IsActive(out int pbActive) + public int IsActive { - this.WrappedObject.IsActive(out pbActive); + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } } public void Deactivate() diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepperEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepperEnum.cs index 29b0f84c7f..b65c8ef266 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepperEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStepperEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr steppers, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr steppers) { + uint pceltFetched; this.WrappedObject.Next(celt, steppers, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStringValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStringValue.cs index dcb3b97036..72874c4b92 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStringValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugStringValue.cs @@ -80,43 +80,72 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void IsValid(out int pbValid) + public int IsValid { - this.WrappedObject.IsValid(out pbValid); + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } } - public void CreateRelocBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateRelocBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } - public void GetLength(out uint pcchString) + public uint Length { - this.WrappedObject.GetLength(out pcchString); + get + { + uint pcchString; + this.WrappedObject.GetLength(out pcchString); + return pcchString; + } } public void GetString(uint cchString, out uint pcchString, System.IntPtr szString) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread.cs index cf2b0bc309..4526d32125 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread.cs @@ -80,28 +80,48 @@ namespace Debugger.Wrappers.CorDebug } - public void GetProcess(out ICorDebugProcess ppProcess) + public ICorDebugProcess Process { - Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; - this.WrappedObject.GetProcess(out out_ppProcess); - ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } } - public void GetID(out uint pdwThreadId) + public uint ID { - this.WrappedObject.GetID(out pdwThreadId); + get + { + uint pdwThreadId; + this.WrappedObject.GetID(out pdwThreadId); + return pdwThreadId; + } } - public void GetHandle(out uint phThreadHandle) + public uint Handle { - this.WrappedObject.GetHandle(out phThreadHandle); + get + { + uint phThreadHandle; + this.WrappedObject.GetHandle(out phThreadHandle); + return phThreadHandle; + } } - public void GetAppDomain(out ICorDebugAppDomain ppAppDomain) + public ICorDebugAppDomain AppDomain { - Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain; - this.WrappedObject.GetAppDomain(out out_ppAppDomain); - ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain); + get + { + ICorDebugAppDomain ppAppDomain; + Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain; + this.WrappedObject.GetAppDomain(out out_ppAppDomain); + ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain); + return ppAppDomain; + } } public void SetDebugState(CorDebugThreadState state) @@ -109,25 +129,40 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state))); } - public void GetDebugState(out CorDebugThreadState pState) + public CorDebugThreadState DebugState { - Debugger.Interop.CorDebug.CorDebugThreadState out_pState; - this.WrappedObject.GetDebugState(out out_pState); - pState = ((CorDebugThreadState)(out_pState)); + get + { + CorDebugThreadState pState; + Debugger.Interop.CorDebug.CorDebugThreadState out_pState; + this.WrappedObject.GetDebugState(out out_pState); + pState = ((CorDebugThreadState)(out_pState)); + return pState; + } } - public void GetUserState(out CorDebugUserState pState) + public CorDebugUserState UserState { - Debugger.Interop.CorDebug.CorDebugUserState out_pState; - this.WrappedObject.GetUserState(out out_pState); - pState = ((CorDebugUserState)(out_pState)); + get + { + CorDebugUserState pState; + Debugger.Interop.CorDebug.CorDebugUserState out_pState; + this.WrappedObject.GetUserState(out out_pState); + pState = ((CorDebugUserState)(out_pState)); + return pState; + } } - public void GetCurrentException(out ICorDebugValue ppExceptionObject) + public ICorDebugValue CurrentException { - Debugger.Interop.CorDebug.ICorDebugValue out_ppExceptionObject; - this.WrappedObject.GetCurrentException(out out_ppExceptionObject); - ppExceptionObject = ICorDebugValue.Wrap(out_ppExceptionObject); + get + { + ICorDebugValue ppExceptionObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppExceptionObject; + this.WrappedObject.GetCurrentException(out out_ppExceptionObject); + ppExceptionObject = ICorDebugValue.Wrap(out_ppExceptionObject); + return ppExceptionObject; + } } public void ClearCurrentException() @@ -135,53 +170,79 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.ClearCurrentException(); } - public void CreateStepper(out ICorDebugStepper ppStepper) + public ICorDebugStepper CreateStepper() { + ICorDebugStepper ppStepper; Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; this.WrappedObject.CreateStepper(out out_ppStepper); ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; } - public void EnumerateChains(out ICorDebugChainEnum ppChains) + public ICorDebugChainEnum EnumerateChains() { + ICorDebugChainEnum ppChains; Debugger.Interop.CorDebug.ICorDebugChainEnum out_ppChains; this.WrappedObject.EnumerateChains(out out_ppChains); ppChains = ICorDebugChainEnum.Wrap(out_ppChains); + return ppChains; } - public void GetActiveChain(out ICorDebugChain ppChain) + public ICorDebugChain ActiveChain { - Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; - this.WrappedObject.GetActiveChain(out out_ppChain); - ppChain = ICorDebugChain.Wrap(out_ppChain); + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetActiveChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } } - public void GetActiveFrame(out ICorDebugFrame ppFrame) + public ICorDebugFrame ActiveFrame { - Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; - this.WrappedObject.GetActiveFrame(out out_ppFrame); - ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetActiveFrame(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } } - public void GetRegisterSet(out ICorDebugRegisterSet ppRegisters) + public ICorDebugRegisterSet RegisterSet { - Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; - this.WrappedObject.GetRegisterSet(out out_ppRegisters); - ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + get + { + ICorDebugRegisterSet ppRegisters; + Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; + this.WrappedObject.GetRegisterSet(out out_ppRegisters); + ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + return ppRegisters; + } } - public void CreateEval(out ICorDebugEval ppEval) + public ICorDebugEval CreateEval() { + ICorDebugEval ppEval; Debugger.Interop.CorDebug.ICorDebugEval out_ppEval; this.WrappedObject.CreateEval(out out_ppEval); ppEval = ICorDebugEval.Wrap(out_ppEval); + return ppEval; } - public void GetObject(out ICorDebugValue ppObject) + public ICorDebugValue Object { - Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; - this.WrappedObject.GetObject(out out_ppObject); - ppObject = ICorDebugValue.Wrap(out_ppObject); + get + { + ICorDebugValue ppObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugValue.Wrap(out_ppObject); + return ppObject; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread2.cs index 803d2f08e2..ac4c997ecd 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThread2.cs @@ -85,19 +85,34 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.GetActiveFunctions(cFunctions, out pcFunctions, pFunctions); } - public void GetConnectionID(out uint pdwConnectionId) + public uint ConnectionID { - this.WrappedObject.GetConnectionID(out pdwConnectionId); + get + { + uint pdwConnectionId; + this.WrappedObject.GetConnectionID(out pdwConnectionId); + return pdwConnectionId; + } } - public void GetTaskID(out ulong pTaskId) + public ulong TaskID { - this.WrappedObject.GetTaskID(out pTaskId); + get + { + ulong pTaskId; + this.WrappedObject.GetTaskID(out pTaskId); + return pTaskId; + } } - public void GetVolatileOSThreadID(out uint pdwTid) + public uint VolatileOSThreadID { - this.WrappedObject.GetVolatileOSThreadID(out pdwTid); + get + { + uint pdwTid; + this.WrappedObject.GetVolatileOSThreadID(out pdwTid); + return pdwTid; + } } public void InterceptCurrentException(ICorDebugFrame pFrame) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThreadEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThreadEnum.cs index 126e9ed239..5f3e312369 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThreadEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugThreadEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr threads, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr threads) { + uint pceltFetched; this.WrappedObject.Next(celt, threads, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugType.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugType.cs index b03aab7d35..9b373074d0 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugType.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugType.cs @@ -80,49 +80,78 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint ty) + public uint Type { - this.WrappedObject.GetType(out ty); + get + { + uint ty; + this.WrappedObject.GetType(out ty); + return ty; + } } - public void GetClass(out ICorDebugClass ppClass) + public ICorDebugClass Class { - Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; - this.WrappedObject.GetClass(out out_ppClass); - ppClass = ICorDebugClass.Wrap(out_ppClass); + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } } - public void EnumerateTypeParameters(out ICorDebugTypeEnum ppTyParEnum) + public ICorDebugTypeEnum EnumerateTypeParameters() { + ICorDebugTypeEnum ppTyParEnum; Debugger.Interop.CorDebug.ICorDebugTypeEnum out_ppTyParEnum; this.WrappedObject.EnumerateTypeParameters(out out_ppTyParEnum); ppTyParEnum = ICorDebugTypeEnum.Wrap(out_ppTyParEnum); + return ppTyParEnum; } - public void GetFirstTypeParameter(out ICorDebugType value) + public ICorDebugType FirstTypeParameter { - Debugger.Interop.CorDebug.ICorDebugType out_value; - this.WrappedObject.GetFirstTypeParameter(out out_value); - value = ICorDebugType.Wrap(out_value); + get + { + ICorDebugType value; + Debugger.Interop.CorDebug.ICorDebugType out_value; + this.WrappedObject.GetFirstTypeParameter(out out_value); + value = ICorDebugType.Wrap(out_value); + return value; + } } - public void GetBase(out ICorDebugType pBase) + public ICorDebugType Base { - Debugger.Interop.CorDebug.ICorDebugType out_pBase; - this.WrappedObject.GetBase(out out_pBase); - pBase = ICorDebugType.Wrap(out_pBase); + get + { + ICorDebugType pBase; + Debugger.Interop.CorDebug.ICorDebugType out_pBase; + this.WrappedObject.GetBase(out out_pBase); + pBase = ICorDebugType.Wrap(out_pBase); + return pBase; + } } - public void GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame, out ICorDebugValue ppValue) + public ICorDebugValue GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame) { + ICorDebugValue ppValue; Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue); ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; } - public void GetRank(out uint pnRank) + public uint Rank { - this.WrappedObject.GetRank(out pnRank); + get + { + uint pnRank; + this.WrappedObject.GetRank(out pnRank); + return pnRank; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugTypeEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugTypeEnum.cs index 440507d4cb..cd29815149 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugTypeEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugTypeEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr values, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr values) { + uint pceltFetched; this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue.cs index b69b920353..794492cc92 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue.cs @@ -80,26 +80,43 @@ namespace Debugger.Wrappers.CorDebug } - public void GetType(out uint pType) + public uint Type { - this.WrappedObject.GetType(out pType); + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } } - public void GetSize(out uint pSize) + public uint Size { - this.WrappedObject.GetSize(out pSize); + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } } - public void GetAddress(out ulong pAddress) + public ulong Address { - this.WrappedObject.GetAddress(out pAddress); + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } } - public void CreateBreakpoint(out ICorDebugValueBreakpoint ppBreakpoint) + public ICorDebugValueBreakpoint CreateBreakpoint() { + ICorDebugValueBreakpoint ppBreakpoint; Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue2.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue2.cs index 9fc6f974e0..2c153abdb7 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue2.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValue2.cs @@ -80,11 +80,16 @@ namespace Debugger.Wrappers.CorDebug } - public void GetExactType(out ICorDebugType ppType) + public ICorDebugType ExactType { - Debugger.Interop.CorDebug.ICorDebugType out_ppType; - this.WrappedObject.GetExactType(out out_ppType); - ppType = ICorDebugType.Wrap(out_ppType); + get + { + ICorDebugType ppType; + Debugger.Interop.CorDebug.ICorDebugType out_ppType; + this.WrappedObject.GetExactType(out out_ppType); + ppType = ICorDebugType.Wrap(out_ppType); + return ppType; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueBreakpoint.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueBreakpoint.cs index 9a9deadde3..07561322ee 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueBreakpoint.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueBreakpoint.cs @@ -85,16 +85,26 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Activate(bActive); } - public void IsActive(out int pbActive) + public int IsActive { - this.WrappedObject.IsActive(out pbActive); + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } } - public void GetValue(out ICorDebugValue ppValue) + public ICorDebugValue Value { - Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; - this.WrappedObject.GetValue(out out_ppValue); - ppValue = ICorDebugValue.Wrap(out_ppValue); + get + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetValue(out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueEnum.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueEnum.cs index f9b47c7041..a1181b8a45 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueEnum.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ICorDebugValueEnum.cs @@ -90,21 +90,30 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Reset(); } - public void Clone(out ICorDebugEnum ppEnum) + public ICorDebugEnum Clone() { + ICorDebugEnum ppEnum; Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; this.WrappedObject.Clone(out out_ppEnum); ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; } - public void GetCount(out uint pcelt) + public uint Count { - this.WrappedObject.GetCount(out pcelt); + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } } - public void Next(uint celt, System.IntPtr values, out uint pceltFetched) + public uint Next(uint celt, System.IntPtr values) { + uint pceltFetched; this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ISequentialStream.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ISequentialStream.cs index d88c064b01..518809858e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ISequentialStream.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/ISequentialStream.cs @@ -80,14 +80,18 @@ namespace Debugger.Wrappers.CorDebug } - public void RemoteRead(out byte pv, uint cb, out uint pcbRead) + public uint RemoteRead(out byte pv, uint cb) { + uint pcbRead; this.WrappedObject.RemoteRead(out pv, cb, out pcbRead); + return pcbRead; } - public void RemoteWrite(ref byte pv, uint cb, out uint pcbWritten) + public uint RemoteWrite(ref byte pv, uint cb) { + uint pcbWritten; this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten); + return pcbWritten; } } } diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/IStream.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/IStream.cs index 52356c301b..47a9aa7d8d 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/IStream.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Wrappers/CorDebug/IStream.cs @@ -80,19 +80,25 @@ namespace Debugger.Wrappers.CorDebug } - public void RemoteRead(out byte pv, uint cb, out uint pcbRead) + public uint RemoteRead(out byte pv, uint cb) { + uint pcbRead; this.WrappedObject.RemoteRead(out pv, cb, out pcbRead); + return pcbRead; } - public void RemoteWrite(ref byte pv, uint cb, out uint pcbWritten) + public uint RemoteWrite(ref byte pv, uint cb) { + uint pcbWritten; this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten); + return pcbWritten; } - public void RemoteSeek(Debugger.Interop.CorDebug._LARGE_INTEGER dlibMove, uint dwOrigin, out Debugger.Interop.CorDebug._ULARGE_INTEGER plibNewPosition) + public Debugger.Interop.CorDebug._ULARGE_INTEGER RemoteSeek(Debugger.Interop.CorDebug._LARGE_INTEGER dlibMove, uint dwOrigin) { + Debugger.Interop.CorDebug._ULARGE_INTEGER plibNewPosition; this.WrappedObject.RemoteSeek(dlibMove, dwOrigin, out plibNewPosition); + return plibNewPosition; } public void SetSize(Debugger.Interop.CorDebug._ULARGE_INTEGER libNewSize) @@ -100,9 +106,11 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.SetSize(libNewSize); } - public void RemoteCopyTo(IStream pstm, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, out Debugger.Interop.CorDebug._ULARGE_INTEGER pcbRead, out Debugger.Interop.CorDebug._ULARGE_INTEGER pcbWritten) + public Debugger.Interop.CorDebug._ULARGE_INTEGER RemoteCopyTo(IStream pstm, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, out Debugger.Interop.CorDebug._ULARGE_INTEGER pcbRead) { + Debugger.Interop.CorDebug._ULARGE_INTEGER pcbWritten; this.WrappedObject.RemoteCopyTo(pstm.WrappedObject, cb, out pcbRead, out pcbWritten); + return pcbWritten; } public void Commit(uint grfCommitFlags) @@ -130,11 +138,13 @@ namespace Debugger.Wrappers.CorDebug this.WrappedObject.Stat(out pstatstg, grfStatFlag); } - public void Clone(out IStream ppstm) + public IStream Clone() { + IStream ppstm; Debugger.Interop.CorDebug.IStream out_ppstm; this.WrappedObject.Clone(out out_ppstm); ppstm = IStream.Wrap(out_ppstm); + return ppstm; } } } diff --git a/src/Tools/WrapperGenerator/CodeGenerator.cs b/src/Tools/WrapperGenerator/CodeGenerator.cs index c0a3762acf..b574e14f21 100644 --- a/src/Tools/WrapperGenerator/CodeGenerator.cs +++ b/src/Tools/WrapperGenerator/CodeGenerator.cs @@ -319,8 +319,9 @@ namespace WrapperGenerator class MethodContext { - CodeMemberMethod codeMemberMethod = new CodeMemberMethod(); + public CodeTypeMember CodeMemberMethod = new CodeMemberMethod(); CodeGenerator generator; + MethodInfo method; public string Name; public bool IsReturnTypeWrapped; @@ -329,12 +330,14 @@ namespace WrapperGenerator public List WrapperParams = new List(); public List DoBeforeInvoke = new List(); + CodeStatement doInvoke; public List BaseMethodInvokeParams = new List(); public List DoAfterInvoke = new List(); public MethodContext(CodeGenerator generator, MethodInfo method) { this.generator = generator; + this.method = method; Name = method.Name; RawReturnType = method.ReturnType; IsReturnTypeWrapped = generator.ShouldIncludeType(method.ReturnType); @@ -343,28 +346,22 @@ namespace WrapperGenerator } else { WrappedReturnType = method.ReturnType.FullName; } - - codeMemberMethod.Attributes = MemberAttributes.Public | MemberAttributes.Final; - codeMemberMethod.ReturnType = new CodeTypeReference(WrappedReturnType); - codeMemberMethod.Name = method.Name; } - public CodeMemberMethod Emit() + void AddBaseInvokeCode() { CodeExpression baseInvoke = new CodeMethodInvokeExpression( new CodeMethodReferenceExpression( generator.ExpressionForWrappedObjectProperty, - Name), + method.Name), BaseMethodInvokeParams.ToArray()); if (IsReturnTypeWrapped) { baseInvoke = generator.Wrap(RawReturnType, baseInvoke); } - CodeStatement doInvoke; - - if (WrappedReturnType != typeof(void).FullName) { + if (RawReturnType != typeof(void)) { if (DoAfterInvoke.Count == 0) { doInvoke = new CodeMethodReturnStatement(baseInvoke); } else { @@ -381,13 +378,31 @@ namespace WrapperGenerator } else { doInvoke = new CodeExpressionStatement(baseInvoke); } + } + + public CodeTypeMember Emit() + { + AddBaseInvokeCode(); + + List body = new List(); + body.AddRange(DoBeforeInvoke); + body.Add(doInvoke); + body.AddRange(DoAfterInvoke); - codeMemberMethod.Statements.AddRange(DoBeforeInvoke.ToArray()); - codeMemberMethod.Statements.Add(doInvoke); - codeMemberMethod.Statements.AddRange(DoAfterInvoke.ToArray()); - codeMemberMethod.Parameters.AddRange(WrapperParams.ToArray()); + CodeMemberMethod.Attributes = MemberAttributes.Public | MemberAttributes.Final; + CodeMemberMethod.Name = Name; - return codeMemberMethod; + if (CodeMemberMethod is CodeMemberMethod) { + ((CodeMemberMethod)CodeMemberMethod).ReturnType = new CodeTypeReference(WrappedReturnType); + ((CodeMemberMethod)CodeMemberMethod).Parameters.AddRange(WrapperParams.ToArray()); + ((CodeMemberMethod)CodeMemberMethod).Statements.AddRange(body.ToArray()); + } else { + ((CodeMemberProperty)CodeMemberMethod).Type = new CodeTypeReference(WrappedReturnType); + ((CodeMemberProperty)CodeMemberMethod).HasGet = true; + ((CodeMemberProperty)CodeMemberMethod).GetStatements.AddRange(body.ToArray()); + } + + return CodeMemberMethod; } } @@ -435,16 +450,17 @@ namespace WrapperGenerator } } - CodeMemberMethod MakeMember(MethodInfo method) + CodeTypeMember MakeMember(MethodInfo method) { MethodContext methodContext = new MethodContext(this, method); - foreach(ParameterInfo par in method.GetParameters()) { - ParamContext parContext = new ParamContext(this, par); + ParameterInfo[] pars = method.GetParameters(); + for(int i = 0; i < pars.Length; i++) { + ParamContext parContext = new ParamContext(this, pars[i]); if (parContext.IsWrapped) { if (parContext.Direction == FieldDirection.In) { - if (par.ParameterType.IsArray) { + if (pars[i].ParameterType.IsArray) { UnwrapArrayArgument(methodContext, parContext); } else { UnwrapArgument(methodContext, parContext); @@ -455,6 +471,33 @@ namespace WrapperGenerator } else { PassArgument(methodContext, parContext); } + + // If last parameter is 'out' and method returns void + if (i == pars.Length - 1 && + parContext.Direction == FieldDirection.Out && + methodContext.RawReturnType == typeof(void)) { + + // Placeholder for the parameter + methodContext.DoBeforeInvoke.Insert(0, + new CodeVariableDeclarationStatement(parContext.WrappedType, parContext.Name)); + // Remove the parameter + methodContext.WrapperParams.RemoveAt(methodContext.WrapperParams.Count - 1); + + methodContext.WrappedReturnType = parContext.WrappedType; + methodContext.DoAfterInvoke.Add( + new CodeMethodReturnStatement( + new CodeVariableReferenceExpression(parContext.Name))); + } + } + + if (methodContext.WrapperParams.Count == 0) { + if (methodContext.Name.StartsWith("Is")) { + methodContext.CodeMemberMethod = new CodeMemberProperty(); + } + if (methodContext.Name.StartsWith("Get")) { + methodContext.CodeMemberMethod = new CodeMemberProperty(); + methodContext.Name = methodContext.Name.Remove(0, 3); + } } return methodContext.Emit();