*val = child->thread.gs; 
*val = child->thread.gsindex; 
static int getreg32(struct task_struct *child, unsigned regno, u32 *val){	__u64 *stack = (__u64 *)(child->thread.rsp0 - sizeof(struct pt_regs)); 	switch (regno) {	case offsetof(struct user32, regs.fs):	        *val = child->thread.fs; 		break;	case offsetof(struct user32, regs.gs):		*val = child->thread.gs;		break;	case offsetof(struct user32, regs.ds):		*val = child->thread.ds;		break;	case offsetof(struct user32, regs.es):		*val = child->thread.es;		break;	R32(cs, cs);	R32(ss, ss);	R32(ebx, rbx); 	R32(ecx, rcx);	R32(edx, rdx);	R32(edi, rdi);	R32(esi, rsi);	R32(ebp, rbp);	R32(eax, rax);	R32(orig_eax, orig_rax);	R32(eip, rip);	R32(eflags, eflags);	R32(esp, rsp);	case offsetof(struct user32, u_debugreg[0]): 		*val = child->thread.debugreg0; 		break; 	case offsetof(struct user32, u_debugreg[1]): 		*val = child->thread.debugreg1; 		break; 	case offsetof(struct user32, u_debugreg[2]): 		*val = child->thread.debugreg2; 		break; 	case offsetof(struct user32, u_debugreg[3]): 		*val = child->thread.debugreg3; 		break; 	case offsetof(struct user32, u_debugreg[6]): 		*val = child->thread.debugreg6; 		break; 	case offsetof(struct user32, u_debugreg[7]): 		*val = child->thread.debugreg7; 		break; 		    	default:		if (regno > sizeof(struct user32) || (regno & 3))			return -EIO;		/* Other dummy fields in the virtual user structure are ignored */ 		*val = 0;		break; 			}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e8ed11b9dc07df0134248542ca8e7d40751a6052/ptrace32.c/buggy/arch/x86_64/ia32/ptrace32.c