user.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* MN10300 User process data
  2. *
  3. * Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
  4. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #ifndef _ASM_USER_H
  12. #define _ASM_USER_H
  13. #include <asm/page.h>
  14. #include <linux/ptrace.h>
  15. #ifndef __ASSEMBLY__
  16. /*
  17. * When the kernel dumps core, it starts by dumping the user struct - this will
  18. * be used by gdb to figure out where the data and stack segments are within
  19. * the file, and what virtual addresses to use.
  20. */
  21. struct user {
  22. /* We start with the registers, to mimic the way that "memory" is
  23. * returned from the ptrace(3,...) function.
  24. */
  25. struct pt_regs regs; /* Where the registers are actually stored */
  26. /* The rest of this junk is to help gdb figure out what goes where */
  27. unsigned long int u_tsize; /* Text segment size (pages). */
  28. unsigned long int u_dsize; /* Data segment size (pages). */
  29. unsigned long int u_ssize; /* Stack segment size (pages). */
  30. unsigned long start_code; /* Starting virtual address of text. */
  31. unsigned long start_stack; /* Starting virtual address of stack area.
  32. This is actually the bottom of the stack,
  33. the top of the stack is always found in the
  34. esp register. */
  35. long int signal; /* Signal that caused the core dump. */
  36. int reserved; /* No longer used */
  37. struct user_pt_regs *u_ar0; /* Used by gdb to help find the values for */
  38. /* the registers */
  39. unsigned long magic; /* To uniquely identify a core file */
  40. char u_comm[32]; /* User command that was responsible */
  41. };
  42. #endif
  43. #define NBPG PAGE_SIZE
  44. #define UPAGES 1
  45. #define HOST_TEXT_START_ADDR +(u.start_code)
  46. #define HOST_STACK_END_ADDR +(u.start_stack + u.u_ssize * NBPG)
  47. #endif /* _ASM_USER_H */