2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: Debug.hpp
|
|
|
|
Date: 2021-6-12
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Debug
|
|
|
|
{
|
|
|
|
struct LastError
|
|
|
|
{
|
|
|
|
AuUInt address;
|
2021-10-24 09:04:02 +00:00
|
|
|
EFailureCategory category;
|
2021-06-27 21:25:29 +00:00
|
|
|
AuString dbg;
|
|
|
|
};
|
|
|
|
|
|
|
|
AuUInt32 GetOSErrorFence();
|
2021-09-06 10:58:08 +00:00
|
|
|
AuOptional<OSError_t> TryGetOrFetchOSError();
|
2021-06-27 21:25:29 +00:00
|
|
|
|
|
|
|
AuUInt32 GetCErrorFence();
|
2022-01-18 14:26:38 +00:00
|
|
|
AuOptional<AuUInt32> TryGetOrFetchCError();
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2021-09-06 10:58:08 +00:00
|
|
|
AuOptional<OSError_t> TryFetchOSError();
|
2022-01-18 14:26:38 +00:00
|
|
|
AuOptional<AuUInt32> TryFetchCError();
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-01-27 20:25:04 +00:00
|
|
|
AuUInt32 ReportStackTrace(const StackTrace &trace, const AuString &message);
|
|
|
|
|
2021-06-27 21:25:29 +00:00
|
|
|
void CheckErrors();
|
2022-01-27 05:24:08 +00:00
|
|
|
void PlatformHandleFatal(bool fatal);
|
2021-06-27 21:25:29 +00:00
|
|
|
void InitDebug();
|
|
|
|
}
|