mk_user_constants.c 578 B

1234567891011121314151617181920212223
  1. #include <stdio.h>
  2. #include <user-offsets.h>
  3. int main(int argc, char **argv)
  4. {
  5. printf("/*\n");
  6. printf(" * Generated by mk_user_constants\n");
  7. printf(" */\n");
  8. printf("\n");
  9. printf("#ifndef __UM_USER_CONSTANTS_H\n");
  10. printf("#define __UM_USER_CONSTANTS_H\n");
  11. printf("\n");
  12. /* I'd like to use FRAME_SIZE from ptrace.h here, but that's wrong on
  13. * x86_64 (216 vs 168 bytes). user_regs_struct is the correct size on
  14. * both x86_64 and i386.
  15. */
  16. printf("#define UM_FRAME_SIZE %d\n", __UM_FRAME_SIZE);
  17. printf("\n");
  18. printf("#endif\n");
  19. return(0);
  20. }