-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring and Bug Fixes. Prepare for GCDump
- Loading branch information
1 parent
3667554
commit 451b423
Showing
20 changed files
with
448 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using DotNet.Meteor.Processes; | ||
using Mono.Debugging.Soft; | ||
|
||
namespace DotNet.Meteor.Debug; | ||
|
||
public abstract class BaseLaunchAgent { | ||
public List<Action> Disposables { get; set; } | ||
|
||
protected BaseLaunchAgent() { | ||
Disposables = new List<Action>(); | ||
} | ||
|
||
public abstract void Connect(SoftDebuggerSession session, LaunchConfiguration configuration); | ||
public abstract void Launch(LaunchConfiguration configuration, IProcessLogger logger); | ||
|
||
public virtual void Dispose() { | ||
foreach(var disposable in Disposables) | ||
disposable.Invoke(); | ||
|
||
Disposables.Clear(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.IO; | ||
using DotNet.Meteor.Debug.Extensions; | ||
using DotNet.Meteor.Debug.Sdk; | ||
using DotNet.Meteor.Debug.Sdk.Profiling; | ||
using DotNet.Meteor.Processes; | ||
using DotNet.Meteor.Shared; | ||
using Mono.Debugging.Soft; | ||
|
||
namespace DotNet.Meteor.Debug; | ||
|
||
public class GCDumpLaunchAgent : BaseLaunchAgent { | ||
public override void Connect(SoftDebuggerSession session, LaunchConfiguration configuration) {} | ||
public override void Launch(LaunchConfiguration configuration, IProcessLogger logger) { | ||
// var nettracePath = Path.Combine(configuration.TempDirectoryPath, $"{configuration.GetApplicationName()}.nettrace"); | ||
// var diagnosticPort = Path.Combine(RuntimeSystem.HomeDirectory, $"{configuration.Device.Platform}-port.lock"); | ||
// ServerExtensions.TryDeleteFile(diagnosticPort); | ||
|
||
// if (configuration.Device.IsAndroid) | ||
// LaunchAndroid(configuration, logger, diagnosticPort, nettracePath); | ||
// if (configuration.Device.IsIPhone) | ||
// LaunchAppleMobile(configuration, logger, diagnosticPort, nettracePath); | ||
// if (configuration.Device.IsMacCatalyst) | ||
// LaunchMacCatalyst(configuration, logger, diagnosticPort, nettracePath); | ||
// if (configuration.Device.IsWindows) | ||
// LaunchWindows(configuration, logger, diagnosticPort, nettracePath); | ||
|
||
// Disposables.Add(() => ServerExtensions.TryDeleteFile(diagnosticPort)); | ||
} | ||
|
||
private void LaunchAppleMobile(LaunchConfiguration configuration, IProcessLogger logger, string diagnosticPort, string nettracePath) { | ||
} | ||
private void LaunchMacCatalyst(LaunchConfiguration configuration, IProcessLogger logger, string diagnosticPort, string nettracePath) { | ||
} | ||
private void LaunchAndroid(LaunchConfiguration configuration, IProcessLogger logger, string diagnosticPort, string nettracePath) { | ||
} | ||
private void LaunchWindows(LaunchConfiguration configuration, IProcessLogger logger, string diagnosticPort, string nettracePath) { | ||
} | ||
} |
Oops, something went wrong.