diff options
| author | 2018-12-20 23:40:30 -0500 | |
|---|---|---|
| committer | 2018-12-21 07:05:34 -0500 | |
| commit | d09fb82113e0a912a66872baa0dd6f1f5c1ef315 (patch) | |
| tree | 2fefada8ebc3e145ea1c3c53be1c00a81bcc97ce /src | |
| parent | kernel/process_capability: Handle handle table capability flags (diff) | |
| download | yuzu-d09fb82113e0a912a66872baa0dd6f1f5c1ef315.tar.gz yuzu-d09fb82113e0a912a66872baa0dd6f1f5c1ef315.tar.xz yuzu-d09fb82113e0a912a66872baa0dd6f1f5c1ef315.zip | |
kernel/process_capability: Handle debug capability flags
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/process_capability.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/process_capability.h | 11 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp index 7ee0ad9cc..3a2164b25 100644 --- a/src/core/hle/kernel/process_capability.cpp +++ b/src/core/hle/kernel/process_capability.cpp | |||
| @@ -342,7 +342,13 @@ ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) { | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) { | 344 | ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) { |
| 345 | // TODO: Implement | 345 | const u32 reserved = flags >> 19; |
| 346 | if (reserved != 0) { | ||
| 347 | return ERR_RESERVED_VALUE; | ||
| 348 | } | ||
| 349 | |||
| 350 | is_debuggable = (flags & 0x20000) != 0; | ||
| 351 | can_force_debug = (flags & 0x40000) != 0; | ||
| 346 | return RESULT_SUCCESS; | 352 | return RESULT_SUCCESS; |
| 347 | } | 353 | } |
| 348 | 354 | ||
diff --git a/src/core/hle/kernel/process_capability.h b/src/core/hle/kernel/process_capability.h index 7b9f24d51..fbc8812a3 100644 --- a/src/core/hle/kernel/process_capability.h +++ b/src/core/hle/kernel/process_capability.h | |||
| @@ -165,6 +165,17 @@ public: | |||
| 165 | return kernel_version; | 165 | return kernel_version; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | /// Whether or not this process can be debugged. | ||
| 169 | bool IsDebuggable() const { | ||
| 170 | return is_debuggable; | ||
| 171 | } | ||
| 172 | |||
| 173 | /// Whether or not this process can forcibly debug another | ||
| 174 | /// process, even if that process is not considered debuggable. | ||
| 175 | bool CanForceDebug() const { | ||
| 176 | return can_force_debug; | ||
| 177 | } | ||
| 178 | |||
| 168 | private: | 179 | private: |
| 169 | /// Attempts to parse a given sequence of capability descriptors. | 180 | /// Attempts to parse a given sequence of capability descriptors. |
| 170 | /// | 181 | /// |