From 1c7a7ed79ba55c5fdefd729b12d6b8aa86a0779b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 13 Oct 2018 14:31:46 -0400 Subject: svc: Implement svcGetProcessInfo A fairly basic service function, which only appears to currently support retrieving the process state. This also alters the ProcessStatus enum to contain all of the values that a kernel process seems to be able of reporting with regards to state. --- src/core/hle/kernel/process.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/core/hle/kernel/process.h') diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 73ec01e11..f2816943a 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -24,6 +24,7 @@ class ProgramMetadata; namespace Kernel { class KernelCore; +class ResourceLimit; struct AddressMapping { // Address and size must be page-aligned @@ -57,9 +58,23 @@ union ProcessFlags { BitField<12, 1, u16> loaded_high; ///< Application loaded high (not at 0x00100000). }; -enum class ProcessStatus { Created, Running, Exited }; - -class ResourceLimit; +/** + * Indicates the status of a Process instance. + * + * @note These match the values as used by kernel, + * so new entries should only be added if RE + * shows that a new value has been introduced. + */ +enum class ProcessStatus { + Created, + CreatedWithDebuggerAttached, + Running, + WaitingForDebuggerToAttach, + DebuggerAttached, + Exiting, + Exited, + DebugBreak, +}; struct CodeSet final { struct Segment { -- cgit v1.2.3