/arch/m68k/kernel/ |
D | ptrace.c | 74 static inline long get_reg(struct task_struct *task, int regno) in get_reg() argument 78 if (regno == PT_USP) in get_reg() 80 else if (regno < ARRAY_SIZE(regoff)) in get_reg() 81 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in get_reg() 85 if (regno == PT_SR || regno == PT_PC) { in get_reg() 89 if (regno == PT_SR) in get_reg() 98 static inline int put_reg(struct task_struct *task, int regno, in put_reg() argument 103 if (regno == PT_USP) in put_reg() 105 else if (regno < ARRAY_SIZE(regoff)) in put_reg() 106 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in put_reg() [all …]
|
/arch/cris/arch-v10/kernel/ |
D | kgdb.c | 577 write_register (int regno, char *val) in write_register() argument 582 if (regno >= R0 && regno <= PC) { in write_register() 584 if (hex2bin((unsigned char *)current_reg + regno * sizeof(unsigned int), in write_register() 588 else if (regno == P0 || regno == VR || regno == P4 || regno == P8) { in write_register() 592 else if (regno == CCR) { in write_register() 595 if (hex2bin((unsigned char *)&(current_reg->ccr) + (regno-CCR) * sizeof(unsigned short), in write_register() 599 else if (regno >= MOF && regno <= USP) { in write_register() 601 if (hex2bin((unsigned char *)&(current_reg->ibr) + (regno-IBR) * sizeof(unsigned int), in write_register() 617 read_register (char regno, unsigned int *valptr) in read_register() argument 621 if (regno >= R0 && regno <= PC) { in read_register() [all …]
|
D | ptrace.c | 29 inline long get_reg(struct task_struct *task, unsigned int regno) in get_reg() argument 35 if (regno == PT_USP) in get_reg() 37 else if (regno < PT_MAX) in get_reg() 38 return ((unsigned long *)task_pt_regs(task))[regno]; in get_reg() 46 inline int put_reg(struct task_struct *task, unsigned int regno, in put_reg() argument 49 if (regno == PT_USP) in put_reg() 51 else if (regno < PT_MAX) in put_reg() 52 ((unsigned long *)task_pt_regs(task))[regno] = data; in put_reg() 82 unsigned int regno = addr >> 2; in arch_ptrace() local 97 if ((addr & 3) || regno > PT_MAX) in arch_ptrace() [all …]
|
/arch/cris/arch-v32/kernel/ |
D | ptrace.c | 29 static int put_debugreg(long pid, unsigned int regno, long data); 30 static long get_debugreg(long pid, unsigned int regno); 39 long get_reg(struct task_struct *task, unsigned int regno) in get_reg() argument 46 if (regno <= PT_EDA) in get_reg() 47 ret = ((unsigned long *)task_pt_regs(task))[regno]; in get_reg() 48 else if (regno == PT_USP) in get_reg() 50 else if (regno == PT_PPC) in get_reg() 52 else if (regno <= PT_MAX) in get_reg() 53 ret = get_debugreg(task->pid, regno); in get_reg() 63 int put_reg(struct task_struct *task, unsigned int regno, unsigned long data) in put_reg() argument [all …]
|
D | kgdb.c | 375 static int write_register(int regno, char *val); 379 static int read_register(char regno, unsigned int *valptr); 538 write_register(int regno, char *val) in write_register() argument 542 if (regno >= R0 && regno <= ACR) { in write_register() 544 if (hex2bin((unsigned char *)®.r0 + (regno - R0) * sizeof(unsigned int), in write_register() 548 } else if (regno == BZ || regno == VR || regno == WZ || regno == DZ) { in write_register() 552 } else if (regno == PID) { in write_register() 558 } else if (regno == SRS) { in write_register() 563 } else if (regno >= EXS && regno <= SPC) { in write_register() 565 if (hex2bin((unsigned char *)®.exs + (regno - EXS) * sizeof(unsigned int), in write_register() [all …]
|
/arch/mips/kernel/ |
D | kgdb.c | 130 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 134 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg() 137 if (dbg_reg_def[regno].offset != -1 && regno < 38) { in dbg_set_reg() 138 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg() 139 dbg_reg_def[regno].size); in dbg_set_reg() 140 } else if (current && dbg_reg_def[regno].offset != -1 && regno < 72) { in dbg_set_reg() 144 if (regno == 70) { in dbg_set_reg() 147 dbg_reg_def[regno].size); in dbg_set_reg() 149 } else if (regno == 71) { in dbg_set_reg() 153 fp_reg = dbg_reg_def[regno].offset; in dbg_set_reg() [all …]
|
/arch/nios2/kernel/ |
D | kgdb.c | 84 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 86 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 89 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 90 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 91 dbg_reg_def[regno].size); in dbg_get_reg() 93 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 95 return dbg_reg_def[regno].name; in dbg_get_reg() 98 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 100 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 103 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/arm/kernel/ |
D | kgdb.c | 50 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 52 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 55 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 56 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 57 dbg_reg_def[regno].size); in dbg_get_reg() 59 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 60 return dbg_reg_def[regno].name; in dbg_get_reg() 63 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 65 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 68 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/arc/kernel/ |
D | kgdb.c | 19 int regno; in to_gdb_regs() local 21 for (regno = 0; regno <= 26; regno++) in to_gdb_regs() 22 gdb_regs[_R0 + regno] = get_reg(regno, kernel_regs, cregs); in to_gdb_regs() 24 for (regno = 27; regno < GDB_MAX_REGS; regno++) in to_gdb_regs() 25 gdb_regs[regno] = 0; in to_gdb_regs() 42 int regno; in from_gdb_regs() local 44 for (regno = 0; regno <= 26; regno++) in from_gdb_regs() 45 set_reg(regno, gdb_regs[regno + _R0], kernel_regs, cregs); in from_gdb_regs()
|
/arch/powerpc/kernel/ |
D | kgdb.c | 348 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 350 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 353 if (regno < 32 || regno >= 64) in dbg_get_reg() 356 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 357 dbg_reg_def[regno].size); in dbg_get_reg() 359 if (regno >= 32 && regno < 64) { in dbg_get_reg() 363 memcpy(mem, ¤t->thread.evr[regno-32], in dbg_get_reg() 364 dbg_reg_def[regno].size); in dbg_get_reg() 367 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 371 return dbg_reg_def[regno].name; in dbg_get_reg() [all …]
|
/arch/c6x/kernel/ |
D | ptrace.c | 33 static inline long get_reg(struct task_struct *task, int regno) in get_reg() argument 37 if (regno == PT_TSR || regno == PT_CSR) in get_reg() 40 return addr[regno]; in get_reg() 47 int regno, in put_reg() argument 52 if (regno != PT_TSR && regno != PT_CSR) in put_reg() 53 addr[regno] = data; in put_reg()
|
/arch/arm64/kernel/ |
D | kgdb.c | 98 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 100 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 103 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 104 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 105 dbg_reg_def[regno].size); in dbg_get_reg() 107 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 108 return dbg_reg_def[regno].name; in dbg_get_reg() 111 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 113 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 116 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/h8300/kernel/ |
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 …]
|
/arch/frv/kernel/ |
D | ptrace.c | 203 static inline long get_reg(struct task_struct *task, int regno) in get_reg() argument 207 if (regno < 0 || regno >= PT__END) in get_reg() 210 return ((unsigned long *) user)[regno]; in get_reg() 216 static inline int put_reg(struct task_struct *task, int regno, in put_reg() argument 221 if (regno < 0 || regno >= PT__END) in put_reg() 224 switch (regno) { in put_reg() 231 ((unsigned long *) user)[regno] = data; in put_reg() 261 int regno = addr >> 2; in arch_ptrace() local 273 switch (regno) { in arch_ptrace() 275 tmp = get_reg(child, regno); in arch_ptrace() [all …]
|
/arch/powerpc/kernel/vdso32/ |
D | sigtramp.S | 57 #define rsave(regno, ofs) \ argument 59 .uleb128 regno; /* regno */ \ 73 #define vsave_msr0(regno) \ argument 75 .uleb128 regno + 77; /* regno */ \ 78 .byte 0x30 + regno; /* DW_OP_lit0 */ \ 103 #define vsave_msr1(regno) \ argument 105 .uleb128 regno + 77; /* regno */ \ 108 .byte 0x30 + regno; /* DW_OP_lit n */ \ 114 #define vsave_msr2(regno, ofs) \ argument 116 .uleb128 regno + 77; /* regno */ \ [all …]
|
/arch/powerpc/kernel/vdso64/ |
D | sigtramp.S | 56 #define rsave(regno, ofs) \ argument 58 .uleb128 regno; /* regno */ \ 72 #define vsave_msr0(regno) \ argument 74 .uleb128 regno + 77; /* regno */ \ 77 .byte 0x30 + regno; /* DW_OP_lit0 */ \ 103 #define vsave_msr1(regno) \ argument 105 .uleb128 regno + 77; /* regno */ \ 108 .byte 0x30 + regno; /* DW_OP_lit n */ \ 114 #define vsave_msr2(regno, ofs) \ argument 116 .uleb128 regno + 77; /* regno */ \ [all …]
|
/arch/sh/kernel/ |
D | kgdb.c | 194 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 196 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg() 199 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() 200 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg() 201 dbg_reg_def[regno].size); in dbg_set_reg() 206 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 208 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 211 if (dbg_reg_def[regno].size != -1) in dbg_get_reg() 212 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 213 dbg_reg_def[regno].size); in dbg_get_reg() [all …]
|
/arch/hexagon/kernel/ |
D | kgdb.c | 90 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 92 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 96 dbg_reg_def[regno].offset)); in dbg_get_reg() 98 return dbg_reg_def[regno].name; in dbg_get_reg() 101 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 103 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 106 *((unsigned long *) ((void *)regs + dbg_reg_def[regno].offset)) = in dbg_set_reg()
|
/arch/x86/include/asm/ |
D | debugreg.h | 20 static inline unsigned long native_get_debugreg(int regno) in native_get_debugreg() argument 24 switch (regno) { in native_get_debugreg() 49 static inline void native_set_debugreg(int regno, unsigned long value) in native_set_debugreg() argument 51 switch (regno) { in native_set_debugreg()
|
/arch/alpha/kernel/ |
D | ptrace.c | 107 get_reg_addr(struct task_struct * task, unsigned long regno) in get_reg_addr() argument 111 if (regno == 30) { in get_reg_addr() 113 } else if (regno == 65) { in get_reg_addr() 115 } else if (regno == 31 || regno > 65) { in get_reg_addr() 119 addr = task_stack_page(task) + regoff[regno]; in get_reg_addr() 128 get_reg(struct task_struct * task, unsigned long regno) in get_reg() argument 131 if (regno == 63) { in get_reg() 132 unsigned long fpcr = *get_reg_addr(task, regno); in get_reg() 138 return *get_reg_addr(task, regno); in get_reg() 145 put_reg(struct task_struct *task, unsigned long regno, unsigned long data) in put_reg() argument [all …]
|
/arch/x86/um/ |
D | ptrace_32.c | 73 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument 75 regno >>= 2; in putreg() 76 switch (regno) { in putreg() 115 panic("Bad register in putreg() : %d\n", regno); in putreg() 117 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg() 140 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument 144 regno >>= 2; in getreg() 145 switch (regno) { in getreg() 168 panic("Bad register in getreg() : %d\n", regno); in getreg() 170 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() 107 panic("Bad register in putreg(): %d\n", regno); in putreg() 110 child->thread.regs.regs.gp[reg_offsets[regno >> 3]] = value; in putreg() 133 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument 140 switch (regno) { in getreg() 172 panic("Bad register in getreg: %d\n", regno); in getreg() 174 return mask & child->thread.regs.regs.gp[reg_offsets[regno >> 3]]; in getreg()
|
/arch/blackfin/kernel/ |
D | ptrace.c | 40 get_reg(struct task_struct *task, unsigned long regno, in get_reg() argument 46 if (regno & 3 || regno > PT_LAST_PSEUDO) in get_reg() 49 switch (regno) { in get_reg() 63 if (regno < sizeof(*regs)) { in get_reg() 65 tmp = *(long *)(reg_ptr + regno); in get_reg() 77 put_reg(struct task_struct *task, unsigned long regno, unsigned long data) in put_reg() argument 81 if (regno & 3 || regno > PT_LAST_PSEUDO) in put_reg() 84 switch (regno) { in put_reg() 104 if (regno < sizeof(*regs)) { in put_reg() 106 *(long *)(reg_offset + regno) = data; in put_reg()
|
/arch/tile/kernel/ |
D | kgdb.c | 97 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 99 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 102 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() 103 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg() 104 dbg_reg_def[regno].size); in dbg_get_reg() 106 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg() 107 return dbg_reg_def[regno].name; in dbg_get_reg() 110 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 112 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg() 115 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() [all …]
|
/arch/x86/kernel/ |
D | kgdb.c | 98 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument 102 regno == GDB_SS || regno == GDB_FS || regno == GDB_GS || in dbg_set_reg() 104 regno == GDB_SP || regno == GDB_ORIG_AX) in dbg_set_reg() 107 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg() 108 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg() 109 dbg_reg_def[regno].size); in dbg_set_reg() 113 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument 115 if (regno == GDB_ORIG_AX) { in dbg_get_reg() 119 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg() 122 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg() [all …]
|