Allow more than one process, free resources on process dispose, implement SvcExitThread
This commit is contained in:
@@ -22,8 +22,6 @@ namespace ChocolArm64
|
||||
|
||||
public bool EnableCpuTrace { get; set; }
|
||||
|
||||
private bool KeepRunning;
|
||||
|
||||
public ATranslator(IReadOnlyDictionary<long, string> SymbolTable = null)
|
||||
{
|
||||
SubBlocks = new HashSet<long>();
|
||||
@@ -38,12 +36,8 @@ namespace ChocolArm64
|
||||
{
|
||||
this.SymbolTable = new ConcurrentDictionary<long, string>();
|
||||
}
|
||||
|
||||
KeepRunning = true;
|
||||
}
|
||||
|
||||
internal void StopExecution() => KeepRunning = false;
|
||||
|
||||
internal void ExecuteSubroutine(AThread Thread, long Position)
|
||||
{
|
||||
do
|
||||
@@ -70,7 +64,7 @@ namespace ChocolArm64
|
||||
|
||||
Position = Sub.Execute(Thread.ThreadState, Thread.Memory);
|
||||
}
|
||||
while (Position != 0 && KeepRunning);
|
||||
while (Position != 0 && Thread.ThreadState.Running);
|
||||
}
|
||||
|
||||
internal bool TryGetCachedSub(AOpCode OpCode, out ATranslatedSub Sub)
|
||||
|
Reference in New Issue
Block a user