aboutsummaryrefslogtreecommitdiff
path: root/arch/um/kernel/skas/util/mk_ptregs-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/skas/util/mk_ptregs-i386.c')
-rw-r--r--arch/um/kernel/skas/util/mk_ptregs-i386.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/arch/um/kernel/skas/util/mk_ptregs-i386.c b/arch/um/kernel/skas/util/mk_ptregs-i386.c
index 0788dd05bca..1f96e1eeb8a 100644
--- a/arch/um/kernel/skas/util/mk_ptregs-i386.c
+++ b/arch/um/kernel/skas/util/mk_ptregs-i386.c
@@ -1,8 +1,7 @@
#include <stdio.h>
-#include <asm/ptrace.h>
-#include <asm/user.h>
+#include <user-offsets.h>
-#define PRINT_REG(name, val) printf("#define HOST_%s %d\n", (name), (val))
+#define SHOW(name) printf("#define %s %d\n", #name, name)
int main(int argc, char **argv)
{
@@ -12,28 +11,27 @@ int main(int argc, char **argv)
printf("#ifndef __SKAS_PT_REGS_\n");
printf("#define __SKAS_PT_REGS_\n");
printf("\n");
- printf("#define HOST_FRAME_SIZE %d\n", FRAME_SIZE);
- printf("#define HOST_FP_SIZE %d\n",
- sizeof(struct user_i387_struct) / sizeof(unsigned long));
- printf("#define HOST_XFP_SIZE %d\n",
- sizeof(struct user_fxsr_struct) / sizeof(unsigned long));
+ SHOW(HOST_FRAME_SIZE);
+ SHOW(HOST_FP_SIZE);
+ SHOW(HOST_XFP_SIZE);
+
+ SHOW(HOST_IP);
+ SHOW(HOST_SP);
+ SHOW(HOST_EFLAGS);
+ SHOW(HOST_EAX);
+ SHOW(HOST_EBX);
+ SHOW(HOST_ECX);
+ SHOW(HOST_EDX);
+ SHOW(HOST_ESI);
+ SHOW(HOST_EDI);
+ SHOW(HOST_EBP);
+ SHOW(HOST_CS);
+ SHOW(HOST_SS);
+ SHOW(HOST_DS);
+ SHOW(HOST_FS);
+ SHOW(HOST_ES);
+ SHOW(HOST_GS);
- PRINT_REG("IP", EIP);
- PRINT_REG("SP", UESP);
- PRINT_REG("EFLAGS", EFL);
- PRINT_REG("EAX", EAX);
- PRINT_REG("EBX", EBX);
- PRINT_REG("ECX", ECX);
- PRINT_REG("EDX", EDX);
- PRINT_REG("ESI", ESI);
- PRINT_REG("EDI", EDI);
- PRINT_REG("EBP", EBP);
- PRINT_REG("CS", CS);
- PRINT_REG("SS", SS);
- PRINT_REG("DS", DS);
- PRINT_REG("FS", FS);
- PRINT_REG("ES", ES);
- PRINT_REG("GS", GS);
printf("\n");
printf("#endif\n");
return(0);