public static SymbolHandler CreateFromHandle(IntPtr handle, SymbolOptions options = SymbolOptions.None, string searchPath = null) { if (searchPath == null) { searchPath = GetDefaultSearchPath(); } Win32.SymSetOptions(options); Win32.SymInitialize(handle, searchPath, true).ThrowIfWin32Failed(); return(new SymbolHandler(handle, false)); }
public static SymbolHandler TryCreateFromProcess(int pid, SymbolOptions options = SymbolOptions.None, string searchPath = null) { if (searchPath == null) { searchPath = GetDefaultSearchPath(); } var handle = new IntPtr(pid); if (Win32.SymInitialize(handle, searchPath, true)) { return(new SymbolHandler(handle, false)); } return(null); }
public static SymbolHandler CreateFromProcess(int pid, SymbolOptions options = SymbolOptions.None, string searchPath = null) { if (searchPath == null) { searchPath = GetDefaultSearchPath(); } var handle = new IntPtr(pid); if (Win32.SymInitialize(handle, searchPath, true)) { return(new SymbolHandler(handle, false)); } throw new Win32Exception(Marshal.GetLastWin32Error()); }
public static SymbolHandler Create(SymbolOptions options = SymbolOptions.CaseInsensitive | SymbolOptions.UndecorateNames, string searchPath = null) { if (Debugger.IsAttached) { options |= SymbolOptions.Debug; } if (searchPath == null) { searchPath = GetDefaultSearchPath(); } Win32.SymSetOptions(options); var handle = new IntPtr(++_instances); Win32.SymInitialize(handle, searchPath, false).ThrowIfWin32Failed(); return(new SymbolHandler(handle, false)); }