]> Chaos Git - corbenik/ctrulib.git/commitdiff
Add the system call outputDebugString.
authorTony Wasserka <NeoBrainX@gmail.com>
Sat, 20 Sep 2014 12:45:45 +0000 (14:45 +0200)
committerTony Wasserka <NeoBrainX@gmail.com>
Sat, 25 Oct 2014 09:52:39 +0000 (11:52 +0200)
This doesn't do anything on retail consoles, but homebrew developers can use it to debug applications in Citra or in other 3DS emulators which HLE this system call.

libctru/include/3ds/svc.h
libctru/source/svc.s

index 402194d218be2d7a8d4a1260ef3ae8174c9a1361..0de77b092552d2a81c57728427d144324388ed29 100644 (file)
@@ -48,5 +48,6 @@ s32  svcGetProcessInfo(s64* out, Handle process, u32 type);
 s32  svcConnectToPort(volatile Handle* out, const char* portName);
 s32  svcSendSyncRequest(Handle session);
 s32  svcGetProcessId(u32 *out, Handle handle);
+s32  svcOutputDebugString(const char* str, int length);
 
 #endif
index 1969ddc97524050284f13bdde1cc5d7db8f88ffc..98ab6b341f9a201e88382ee45a3cff066dcb4573 100644 (file)
@@ -195,3 +195,13 @@ svcGetProcessId:
        ldr r3, [sp], #4
        str r1, [r3]
        bx lr
+
+.global svcOutputDebugString
+.type svcOutputDebugString, %function
+svcOutputDebugString:
+   str r0, [sp,#-0x4]!
+   svc 0x3D
+   ldr r2, [sp], #4
+   str r1, [r2]
+   bx lr
+