Merge branch 'master' into fix/alloc_directory

This commit is contained in:
Quajak 2020-11-04 21:25:56 +01:00 committed by GitHub
commit 0c5b313352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View file

@ -90,6 +90,11 @@ namespace Cosmos.TestRunner.Core
aDebugConnector.CmdCoreDump = dump =>
{
if(dump == null)
{
OutputHandler.LogMessage("Attempted to dump core but didnt get enough data;");
return;
}
OutputHandler.LogMessage("Core dump:");
string eax = "EAX = 0x" + dump.EAX.ToString("X8");

View file

@ -26,7 +26,7 @@ namespace Cosmos.TestRunner.Core
protected override void OnUnhandledException(Exception exception)
{
Log("Unhandled exception: " + exception.ToString());
Log("Unhandled exception: " + exception?.ToString() ?? "Unable to get exception: Exception was null!");
}
protected override void OnExecutionEnd()

View file

@ -48,12 +48,18 @@ namespace Cosmos.Debug.DebugConnectors
{
stack.Push(BitConverter.ToUInt32(stackBytes, i));
}
return new CoreDump(
stack.Pop(), stack.Pop(), stack.Pop(), stack.Pop(),
stack.Pop(), stack.Pop(),
stack.Pop(), stack.Pop(), stack.Pop(),
stack);
if(stack.Count != 9)
{
return null;
}
else
{
return new CoreDump(
stack.Pop(), stack.Pop(), stack.Pop(), stack.Pop(),
stack.Pop(), stack.Pop(),
stack.Pop(), stack.Pop(), stack.Pop(),
stack);
}
}
}
}