]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/um/kernel/skas/util/mk_ptregs-i386.c
Linux-2.6.12-rc2
[mirror_ubuntu-artful-kernel.git] / arch / um / kernel / skas / util / mk_ptregs-i386.c
1 #include <stdio.h>
2 #include <asm/ptrace.h>
3 #include <asm/user.h>
4
5 #define PRINT_REG(name, val) printf("#define HOST_%s %d\n", (name), (val))
6
7 int main(int argc, char **argv)
8 {
9 printf("/* Automatically generated by "
10 "arch/um/kernel/skas/util/mk_ptregs */\n");
11 printf("\n");
12 printf("#ifndef __SKAS_PT_REGS_\n");
13 printf("#define __SKAS_PT_REGS_\n");
14 printf("\n");
15 printf("#define HOST_FRAME_SIZE %d\n", FRAME_SIZE);
16 printf("#define HOST_FP_SIZE %d\n",
17 sizeof(struct user_i387_struct) / sizeof(unsigned long));
18 printf("#define HOST_XFP_SIZE %d\n",
19 sizeof(struct user_fxsr_struct) / sizeof(unsigned long));
20
21 PRINT_REG("IP", EIP);
22 PRINT_REG("SP", UESP);
23 PRINT_REG("EFLAGS", EFL);
24 PRINT_REG("EAX", EAX);
25 PRINT_REG("EBX", EBX);
26 PRINT_REG("ECX", ECX);
27 PRINT_REG("EDX", EDX);
28 PRINT_REG("ESI", ESI);
29 PRINT_REG("EDI", EDI);
30 PRINT_REG("EBP", EBP);
31 PRINT_REG("CS", CS);
32 PRINT_REG("SS", SS);
33 PRINT_REG("DS", DS);
34 PRINT_REG("FS", FS);
35 PRINT_REG("ES", ES);
36 PRINT_REG("GS", GS);
37 printf("\n");
38 printf("#endif\n");
39 return(0);
40 }
41
42 /*
43 * Overrides for Emacs so that we follow Linus's tabbing style.
44 * Emacs will notice this stuff at the end of the file and automatically
45 * adjust the settings for this buffer only. This must remain at the end
46 * of the file.
47 * ---------------------------------------------------------------------------
48 * Local variables:
49 * c-file-style: "linux"
50 * End:
51 */