int GetContextStackTrace( IntPtr self, IntPtr startContext, uint startContextSize, DEBUG_STACK_FRAME[] frames, uint framesSize, IntPtr frameContexts, uint frameContextsSize, uint frameContextsEntrySize, uint *framesFilled) { // Don't fail, but always return 0 native frames so "clrstack -f" still prints the managed frames SOSHost.Write(framesFilled); return(S_OK); }
unsafe int GetModuleInfo( IntPtr self, uint index, ulong *moduleBase, ulong *moduleSize) { try { ModuleInfo module = _soshost.DataReader.EnumerateModules().ElementAt((int)index); if (module == null) { return(E_FAIL); } SOSHost.Write(moduleBase, module.ImageBase); SOSHost.Write(moduleSize, module.FileSize); } catch (ArgumentOutOfRangeException) { return(E_FAIL); } return(S_OK); }