vitasdk
Documentation of the vitasdk
debugger.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2KERN_KERNEL_THREADMGR_DEBUGGER_H_
8 #define _PSP2KERN_KERNEL_THREADMGR_DEBUGGER_H_
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2kern/types.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
19 typedef struct SceArmCpuRegisters
20 {
21  uint32_t r0;
22  uint32_t r1;
23  uint32_t r2;
24  uint32_t r3;
25  uint32_t r4;
26  uint32_t r5;
27  uint32_t r6;
28  uint32_t r7;
29  uint32_t r8;
30  uint32_t r9;
31  uint32_t r10;
32  uint32_t r11;
33  uint32_t r12;
34  uint32_t sp;
35  uint32_t lr;
36  uint32_t pc;
37  uint32_t cpsr;
38  uint32_t fpscr;
41 
42 /* Typedef for compatibility */
44 
46 typedef struct SceThreadCpuRegisters
47 {
48  union {
49  struct { // These are wrong. Please use "entry[2]"
52 
55  };
57  };
60 
61 /* Typedef for compatibility */
63 
65  ScePID process_id; //<! Process ID the thread scheduled on this CPU belongs to
66  SceUID thread_id; //<! Thread ID of the thread scheduled on this CPU
69 
70 
79 int ksceKernelGetThreadIdList(SceUID pid, SceUID *ids, int n, int *copy_count);
80 
93 
105 
106 
121 
130 
139 
150 int ksceKernelDebugSuspendThread(SceUID thid, int status);
151 
162 int ksceKernelDebugResumeThread(SceUID thid, int status);
163 
164 int ksceKernelGetThreadInfoForDebugger(SceUID thid, int a2, void *pInfo);
165 int ksceKernelGetVfpRegisterForDebugger(SceUID thid, void *pVfpRegister);
166 
167 
168 /* For backwards compatibility */
172 } SCE_DEPRECATED_EX(SceKernelFaultingProcessInfo, "This structure has been replaced by SceKernelThreadContextInfo");
173 
174 #define ksceKernelGetFaultingProcessInfo(info) ksceKernelGetThreadContextInfo((SceKernelThreadContextInfo*)info)
175 
176 
177 #ifdef __cplusplus
178 }
179 #endif
180 
181 #endif /* _PSP2KERN_KERNEL_THREADMGR_DEBUGGER_H_ */
SceArmCpuRegisters ArmCpuRegisters
Definition: debugger.h:43
uint32_t fpscr
Definition: debugger.h:38
uint32_t r1
Definition: debugger.h:22
int ksceKernelIsThreadDebugSuspended(SceUID thid)
Get thread suspend status.
int ksceKernelChangeThreadSuspendStatus(SceUID thid, int status)
Change the thread suspension status to another value.
uint32_t r3
Definition: debugger.h:24
int ksceKernelDebugSuspendThread(SceUID thid, int status)
Debug suspend a thread.
uint32_t lr
Definition: debugger.h:35
uint32_t cpsr
Definition: debugger.h:37
struct SceKernelFaultingProcessInfo SCE_DEPRECATED_EX(SceKernelFaultingProcessInfo, "This structure has been replaced by SceKernelThreadContextInfo")
SceUID faultingThreadId
Definition: debugger.h:171
uint32_t r11
Definition: debugger.h:32
SceArmCpuRegisters kernel
Set of registers used for kernel mode.
Definition: debugger.h:54
int ksceKernelGetThreadIdList(SceUID pid, SceUID *ids, int n, int *copy_count)
Retrieve a list of all threads belonging to a process.
uint32_t r0
Definition: debugger.h:21
uint32_t pc
Definition: debugger.h:36
int ksceKernelGetThreadInfoForDebugger(SceUID thid, int a2, void *pInfo)
int ksceKernelGetThreadContextInfo(SceKernelThreadContextInfo *pInfo)
Obtain the context information for the thread scheduled on this CPU.
uint32_t r12
Definition: debugger.h:33
uint32_t sp
Definition: debugger.h:34
uint32_t r6
Definition: debugger.h:27
SceUID pid
Definition: debugger.h:170
int ksceKernelGetVfpRegisterForDebugger(SceUID thid, void *pVfpRegister)
uint32_t r8
Definition: debugger.h:29
uint32_t r2
Definition: debugger.h:23
uint32_t r10
Definition: debugger.h:31
int ksceKernelGetThreadCpuRegisters(SceUID thid, SceThreadCpuRegisters *registers)
Query the state of the registers for a suspended thread.
uint32_t r5
Definition: debugger.h:26
int ksceKernelDebugResumeThread(SceUID thid, int status)
Debug resume a thread.
uint32_t r9
Definition: debugger.h:30
SceArmCpuRegisters user
Set of registers used for user mode.
Definition: debugger.h:51
uint32_t r7
Definition: debugger.h:28
SceUID pid
Definition: debugger.h:0
SceThreadCpuRegisters ThreadCpuRegisters
Definition: debugger.h:62
SceUID ksceKernelGetUserThreadId(SceUID thid)
Get thread PUID from GUID.
SceUID thread_id
Definition: debugger.h:66
VITASDK_BUILD_ASSERT_EQ(0x48, SceArmCpuRegisters)
uint32_t r4
Definition: debugger.h:25
ScePID process_id
Definition: debugger.h:65
Structure representing all ARM registers.
Definition: debugger.h:20
Definition: debugger.h:169
Definition: debugger.h:64
Structure containing a threads register states.
Definition: debugger.h:47
int ScePID
Process ID.
Definition: types.h:91
int SceUID
UIDs are used to describe many different kernel objects.
Definition: types.h:90