Skip to content

Commit

Permalink
Move creation of dbg objs from engine to dnSpy
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Mar 4, 2017
1 parent 308df07 commit 4731643
Show file tree
Hide file tree
Showing 44 changed files with 1,649 additions and 1,150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,20 @@ You should have received a copy of the GNU General Public License
*/

using System;
using dndbg.Engine;
using dnSpy.Contracts.Debugger;
using dnSpy.Contracts.Debugger.DotNet;
using dnSpy.Contracts.Debugger.DotNet.CorDebug;

namespace dnSpy.Debugger.CorDebug.Impl {
sealed class DbgClrThreadImpl : DbgClrThread {
sealed class CorDebugRuntimeImpl : CorDebugRuntime {
public override DbgRuntime Runtime { get; }
public override DbgAppDomain AppDomain { get; }
public override string Kind => kind;
public override int Id => id;
public override int? ManagedId => managedId;
public override string Name => name;

internal DnThread DnThread { get; }
string kind;
int id;
int? managedId;
string name;

public DbgClrThreadImpl(DbgRuntime runtime, DbgAppDomain appDomain, DnThread dnThread) {
public override CorDebugRuntimeVersion Version { get; }
public override string ClrFilename { get; }
public override string RuntimeDirectory { get; }
public CorDebugRuntimeImpl(DbgRuntime runtime, CorDebugRuntimeKind kind, string version, string clrPath, string runtimeDir) {
Runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
DnThread = dnThread ?? throw new ArgumentNullException(nameof(dnThread));
AppDomain = appDomain;
kind = PredefinedThreadKinds.Unknown;
id = dnThread.VolatileThreadId;
managedId = null;
name = null;
Version = new CorDebugRuntimeVersion(kind, version ?? throw new ArgumentNullException(nameof(version)));
ClrFilename = clrPath ?? throw new ArgumentNullException(nameof(clrPath));
RuntimeDirectory = runtimeDir ?? throw new ArgumentNullException(nameof(runtimeDir));
}

protected override void CloseCore() { }
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4731643

Please sign in to comment.