/arch/m68k/kernel/ |
D | ptrace.c | 75 static inline long get_reg(struct task_struct *task, int regno) in get_reg() argument 79 if (regno == PT_USP) in get_reg() 81 else if (regno < ARRAY_SIZE(regoff)) in get_reg() 82 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in get_reg() 86 if (regno == PT_SR || regno == PT_PC) { in get_reg() 90 if (regno == PT_SR) in get_reg() 99 static inline int put_reg(struct task_struct *task, int regno, in put_reg() argument 104 if (regno == PT_USP) in put_reg() 106 else if (regno < ARRAY_SIZE(regoff)) in put_reg() 107 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in put_reg() [all …]
|
/arch/h8300/kernel/ |
D | kgdb.c | 35 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 37 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 40 switch (regno) { in dbg_get_reg() 46 dbg_reg_def[regno].offset); in dbg_get_reg() 49 if (dbg_reg_def[regno].offset >= 0) in dbg_get_reg() 50 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 51 dbg_reg_def[regno].size); in dbg_get_reg() 53 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 56 return dbg_reg_def[regno].name; in dbg_get_reg() 59 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument [all …]
|
D | ptrace.c | 39 long h8300_get_reg(struct task_struct *task, int regno) in h8300_get_reg() argument 41 switch (regno) { in h8300_get_reg() 47 register_offset[regno]); in h8300_get_reg() 50 register_offset[regno]); in h8300_get_reg() 54 int h8300_put_reg(struct task_struct *task, int regno, unsigned long data) in h8300_put_reg() argument 59 switch (regno) { in h8300_put_reg() 64 register_offset[regno]); in h8300_put_reg() 69 register_offset[regno]) = data; in h8300_put_reg() 73 register_offset[regno]); in h8300_put_reg() 78 register_offset[regno]) = data; in h8300_put_reg() [all …]
|
D | ptrace_h.c | 169 int regno; in decode() local 191 regno = (*pc >> 4) & 0x07; in decode() 192 if (regno == 0) in decode() 195 addr = h8300_get_reg(child, regno-1 + PT_ER1); in decode()
|
/arch/mips/kernel/ |
D | kgdb.c | 131 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 135 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg() 138 if (dbg_reg_def[regno].offset != -1 && regno < 38) { in dbg_set_reg() 139 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg() 140 dbg_reg_def[regno].size); in dbg_set_reg() 141 } else if (current && dbg_reg_def[regno].offset != -1 && regno < 72) { in dbg_set_reg() 145 if (regno == 70) { in dbg_set_reg() 148 dbg_reg_def[regno].size); in dbg_set_reg() 150 } else if (regno == 71) { in dbg_set_reg() 154 fp_reg = dbg_reg_def[regno].offset; in dbg_set_reg() [all …]
|
/arch/arm/kernel/ |
D | kgdb.c | 51 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 53 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 56 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 57 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 58 dbg_reg_def[regno].size); in dbg_get_reg() 60 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 61 return dbg_reg_def[regno].name; in dbg_get_reg() 64 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 66 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 69 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/nios2/kernel/ |
D | kgdb.c | 71 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 73 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 76 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 77 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 78 dbg_reg_def[regno].size); in dbg_get_reg() 80 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 82 return dbg_reg_def[regno].name; in dbg_get_reg() 85 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 87 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 90 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/arc/kernel/ |
D | kgdb.c | 17 int regno; in to_gdb_regs() local 19 for (regno = 0; regno <= 26; regno++) in to_gdb_regs() 20 gdb_regs[_R0 + regno] = get_reg(regno, kernel_regs, cregs); in to_gdb_regs() 22 for (regno = 27; regno < GDB_MAX_REGS; regno++) in to_gdb_regs() 23 gdb_regs[regno] = 0; in to_gdb_regs() 40 int regno; in from_gdb_regs() local 42 for (regno = 0; regno <= 26; regno++) in from_gdb_regs() 43 set_reg(regno, gdb_regs[regno + _R0], kernel_regs, cregs); in from_gdb_regs()
|
/arch/powerpc/kernel/ |
D | kgdb.c | 321 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 323 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 326 if (regno < 32 || regno >= 64) in dbg_get_reg() 329 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 330 dbg_reg_def[regno].size); in dbg_get_reg() 332 if (regno >= 32 && regno < 64) { in dbg_get_reg() 336 memcpy(mem, ¤t->thread.evr[regno-32], in dbg_get_reg() 337 dbg_reg_def[regno].size); in dbg_get_reg() 340 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 344 return dbg_reg_def[regno].name; in dbg_get_reg() [all …]
|
/arch/c6x/kernel/ |
D | ptrace.c | 31 static inline long get_reg(struct task_struct *task, int regno) in get_reg() argument 35 if (regno == PT_TSR || regno == PT_CSR) in get_reg() 38 return addr[regno]; in get_reg() 45 int regno, in put_reg() argument 50 if (regno != PT_TSR && regno != PT_CSR) in put_reg() 51 addr[regno] = data; in put_reg()
|
/arch/arm64/kernel/ |
D | kgdb.c | 103 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 105 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 108 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 109 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 110 dbg_reg_def[regno].size); in dbg_get_reg() 112 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 113 return dbg_reg_def[regno].name; in dbg_get_reg() 116 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 118 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 121 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/powerpc/kernel/vdso32/ |
D | sigtramp.S | 53 #define rsave(regno, ofs) \ argument 55 .uleb128 regno; /* regno */ \ 69 #define vsave_msr0(regno) \ argument 71 .uleb128 regno + 77; /* regno */ \ 74 .byte 0x30 + regno; /* DW_OP_lit0 */ \ 99 #define vsave_msr1(regno) \ argument 101 .uleb128 regno + 77; /* regno */ \ 104 .byte 0x30 + regno; /* DW_OP_lit n */ \ 110 #define vsave_msr2(regno, ofs) \ argument 112 .uleb128 regno + 77; /* regno */ \ [all …]
|
/arch/powerpc/kernel/vdso64/ |
D | sigtramp.S | 52 #define rsave(regno, ofs) \ argument 54 .uleb128 regno; /* regno */ \ 68 #define vsave_msr0(regno) \ argument 70 .uleb128 regno + 77; /* regno */ \ 73 .byte 0x30 + regno; /* DW_OP_lit0 */ \ 99 #define vsave_msr1(regno) \ argument 101 .uleb128 regno + 77; /* regno */ \ 104 .byte 0x30 + regno; /* DW_OP_lit n */ \ 110 #define vsave_msr2(regno, ofs) \ argument 112 .uleb128 regno + 77; /* regno */ \ [all …]
|
/arch/sh/kernel/ |
D | kgdb.c | 193 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 195 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg() 198 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() 199 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg() 200 dbg_reg_def[regno].size); in dbg_set_reg() 205 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 207 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 210 if (dbg_reg_def[regno].size != -1) in dbg_get_reg() 211 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 212 dbg_reg_def[regno].size); in dbg_get_reg() [all …]
|
/arch/hexagon/kernel/ |
D | kgdb.c | 78 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 80 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 84 dbg_reg_def[regno].offset)); in dbg_get_reg() 86 return dbg_reg_def[regno].name; in dbg_get_reg() 89 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 91 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 94 *((unsigned long *) ((void *)regs + dbg_reg_def[regno].offset)) = in dbg_set_reg()
|
/arch/alpha/kernel/ |
D | ptrace.c | 109 get_reg_addr(struct task_struct * task, unsigned long regno) in get_reg_addr() argument 113 if (regno == 30) { in get_reg_addr() 115 } else if (regno == 65) { in get_reg_addr() 117 } else if (regno == 31 || regno > 65) { in get_reg_addr() 121 addr = task_stack_page(task) + regoff[regno]; in get_reg_addr() 130 get_reg(struct task_struct * task, unsigned long regno) in get_reg() argument 133 if (regno == 63) { in get_reg() 134 unsigned long fpcr = *get_reg_addr(task, regno); in get_reg() 140 return *get_reg_addr(task, regno); in get_reg() 147 put_reg(struct task_struct *task, unsigned long regno, unsigned long data) in put_reg() argument [all …]
|
/arch/x86/include/asm/ |
D | debugreg.h | 21 static inline unsigned long native_get_debugreg(int regno) in native_get_debugreg() argument 25 switch (regno) { in native_get_debugreg() 50 static inline void native_set_debugreg(int regno, unsigned long value) in native_set_debugreg() argument 52 switch (regno) { in native_set_debugreg()
|
/arch/x86/um/ |
D | ptrace_32.c | 75 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument 77 regno >>= 2; in putreg() 78 switch (regno) { in putreg() 118 panic("Bad register in putreg() : %d\n", regno); in putreg() 120 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg() 143 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument 147 regno >>= 2; in getreg() 148 switch (regno) { in getreg() 170 panic("Bad register in getreg() : %d\n", regno); in getreg() 172 return mask & child->thread.regs.regs.gp[reg_offsets[regno]]; in getreg()
|
D | ptrace_64.c | 53 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument 63 switch (regno) { in putreg() 111 panic("Bad register in putreg(): %d\n", regno); in putreg() 114 child->thread.regs.regs.gp[reg_offsets[regno >> 3]] = value; in putreg() 137 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument 144 switch (regno) { in getreg() 176 panic("Bad register in getreg: %d\n", regno); in getreg() 178 return mask & child->thread.regs.regs.gp[reg_offsets[regno >> 3]]; in getreg()
|
/arch/x86/kernel/ |
D | kgdb.c | 91 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 95 regno == GDB_SS || regno == GDB_FS || regno == GDB_GS || in dbg_set_reg() 97 regno == GDB_SP || regno == GDB_ORIG_AX) in dbg_set_reg() 100 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() 101 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg() 102 dbg_reg_def[regno].size); in dbg_set_reg() 106 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 108 if (regno == GDB_ORIG_AX) { in dbg_get_reg() 112 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 115 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() [all …]
|
/arch/h8300/include/asm/ |
D | ptrace.h | 34 extern long h8300_get_reg(struct task_struct *task, int regno); 35 extern int h8300_put_reg(struct task_struct *task, int regno,
|
/arch/um/include/asm/ |
D | ptrace-generic.h | 36 extern unsigned long getreg(struct task_struct *child, int regno); 37 extern int putreg(struct task_struct *child, int regno, unsigned long value);
|
/arch/x86/lib/ |
D | insn-eval.c | 399 int regno = 0; in get_reg_offset() local 431 regno = X86_MODRM_RM(insn->modrm.value); in get_reg_offset() 437 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_reg_offset() 441 regno += 8; in get_reg_offset() 445 regno = X86_SIB_INDEX(insn->sib.value); in get_reg_offset() 447 regno += 8; in get_reg_offset() 455 if (X86_MODRM_MOD(insn->modrm.value) != 3 && regno == 4) in get_reg_offset() 460 regno = X86_SIB_BASE(insn->sib.value); in get_reg_offset() 466 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_reg_offset() 470 regno += 8; in get_reg_offset() [all …]
|
/arch/xtensa/kernel/ |
D | ptrace.c | 269 static int ptrace_peekusr(struct task_struct *child, long regno, in ptrace_peekusr() argument 278 switch(regno) { in ptrace_peekusr() 280 tmp = regs->areg[regno - REG_AR_BASE]; in ptrace_peekusr() 284 tmp = regs->areg[regno - REG_A_BASE]; in ptrace_peekusr() 336 static int ptrace_pokeusr(struct task_struct *child, long regno, long val) in ptrace_pokeusr() argument 341 switch (regno) { in ptrace_pokeusr() 343 regs->areg[regno - REG_AR_BASE] = val; in ptrace_pokeusr() 347 regs->areg[regno - REG_A_BASE] = val; in ptrace_pokeusr()
|
/arch/x86/entry/vdso/vdso32/ |
D | sigreturn.S | 81 #define do_expr(regno, offset) \ argument 83 .uleb128 regno; /* regno */ \
|