ams: support building unit test programs on windows/linux/macos

This commit is contained in:
Michael Scire
2022-03-06 12:08:20 -08:00
committed by SciresM
parent 9a38be201a
commit 64a97576d0
756 changed files with 33359 additions and 9372 deletions

View File

@@ -21,7 +21,7 @@ namespace ams::osdbg {
struct ThreadInfo;
Result InitializeThreadInfo(ThreadInfo *thread_info, os::NativeHandle debug_handle, const svc::DebugInfoCreateProcess *create_process, const svc::DebugInfoCreateThread *create_thread);
Result InitializeThreadInfo(ThreadInfo *thread_info, os::NativeHandle debug_handle, const osdbg::DebugInfoCreateProcess *create_process, const osdbg::DebugInfoCreateThread *create_thread);
Result UpdateThreadInfo(ThreadInfo *thread_info);
Result GetThreadName(char *dst, const ThreadInfo *thread_info);

View File

@@ -24,11 +24,21 @@ namespace ams::osdbg {
}
#if defined(ATMOSPHERE_OS_HORIZON)
using DebugInfoCreateProcess = svc::DebugInfoCreateProcess;
using DebugInfoCreateThread = svc::DebugInfoCreateThread;
#else
struct DebugInfoCreateProcess{};
struct DebugInfoCreateThread{};
#endif
enum ThreadTypeType : u8 {
ThreadTypeType_Unknown = 0,
ThreadTypeType_Nintendo,
ThreadTypeType_Stratosphere,
#if defined(ATMOSPHERE_OS_HORIZON)
ThreadTypeType_Libnx,
#endif
};
struct ThreadInfo {
@@ -42,8 +52,10 @@ namespace ams::osdbg {
impl::ThreadTypeCommon *_thread_type;
os::NativeHandle _debug_handle;
ThreadTypeType _thread_type_type;
svc::DebugInfoCreateProcess _debug_info_create_process;
svc::DebugInfoCreateThread _debug_info_create_thread;
#if defined(ATMOSPHERE_OS_HORIZON)
osdbg::DebugInfoCreateProcess _debug_info_create_process;
osdbg::DebugInfoCreateThread _debug_info_create_thread;
#endif
};
}