diff --git a/stratosphere/fatal/fatal.json b/stratosphere/fatal/fatal.json
index 380b2b85f..61f6ca88f 100644
--- a/stratosphere/fatal/fatal.json
+++ b/stratosphere/fatal/fatal.json
@@ -12,7 +12,7 @@
"is_64_bit": true,
"address_space_type": 3,
"filesystem_access": {
- "permissions": "0x0000000000100000"
+ "permissions": "0xFFFFFFFFFFFFFFFF"
},
"service_access": ["bpc", "bpc:c", "erpt:c", "fsp-srv", "gpio", "i2c", "lbl", "lm", "nvdrv:s", "pcv", "pl:u", "pm:info", "psm", "set", "set:sys", "spsm", "vi:m", "vi:s"],
"service_host": ["fatal:p", "fatal:u"],
@@ -76,7 +76,14 @@
"svcReplyAndReceive": "0x43",
"svcReplyAndReceiveWithUserBuffer": "0x44",
"svcCreateEvent": "0x45",
- "svcReadWriteRegister": "0x4E"
+ "svcReadWriteRegister": "0x4E",
+ "svcDebugActiveProcess": "0x60",
+ "svcGetDebugEvent": "0x63",
+ "svcGetThreadList": "0x66",
+ "svcGetDebugThreadContext": "0x67",
+ "svcQueryDebugProcessMemory": "0x69",
+ "svcReadDebugProcessMemory": "0x6a",
+ "svcGetDebugThreadParam": "0x6d"
}
}, {
"type": "min_kernel_version",
diff --git a/stratosphere/fatal/source/fatal_debug.cpp b/stratosphere/fatal/source/fatal_debug.cpp
new file mode 100644
index 000000000..46ed8df13
--- /dev/null
+++ b/stratosphere/fatal/source/fatal_debug.cpp
@@ -0,0 +1,256 @@
+/*
+ * Copyright (c) 2018 Atmosphère-NX
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+#include