AuroraRuntime/Include/Aurora/Debug/StackTrace.hpp

25 lines
614 B
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: StackTrace.hpp
Date: 2021-6-10
Author: Reece
***/
#pragma once
namespace Aurora::Debug
{
struct StackTraceEntry
{
2021-09-06 10:58:08 +00:00
AuOptional<AuString> label;
2021-06-27 21:25:29 +00:00
AuUInt64 address;
AuUInt64 relAddress;
2021-09-06 10:58:08 +00:00
AuOptional<AuString> module;
AuOptional<AuTuple<AuString, int, int>> file; // file, line, offset
2021-06-27 21:25:29 +00:00
AUKN_SYM AuString Stringify() const;
};
using StackTrace = AuList<StackTraceEntry>;
AUKN_SYM AuString StringifyStackTrace(const StackTrace &backtrace);
}