user.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef _ASM_IA64_USER_H
  2. #define _ASM_IA64_USER_H
  3. /*
  4. * Core file format: The core file is written in such a way that gdb
  5. * can understand it and provide useful information to the user (under
  6. * linux we use the `trad-core' bfd). The file contents are as
  7. * follows:
  8. *
  9. * upage: 1 page consisting of a user struct that tells gdb
  10. * what is present in the file. Directly after this is a
  11. * copy of the task_struct, which is currently not used by gdb,
  12. * but it may come in handy at some point. All of the registers
  13. * are stored as part of the upage. The upage should always be
  14. * only one page long.
  15. * data: The data segment follows next. We use current->end_text to
  16. * current->brk to pick up all of the user variables, plus any memory
  17. * that may have been sbrk'ed. No attempt is made to determine if a
  18. * page is demand-zero or if a page is totally unused, we just cover
  19. * the entire range. All of the addresses are rounded in such a way
  20. * that an integral number of pages is written.
  21. * stack: We need the stack information in order to get a meaningful
  22. * backtrace. We need to write the data from usp to
  23. * current->start_stack, so we round each of these in order to be able
  24. * to write an integer number of pages.
  25. *
  26. * Modified 1998, 1999, 2001
  27. * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
  28. */
  29. #include <linux/ptrace.h>
  30. #include <linux/types.h>
  31. #include <asm/page.h>
  32. #define EF_SIZE 3072 /* XXX fix me */
  33. struct user {
  34. unsigned long regs[EF_SIZE/8+32]; /* integer and fp regs */
  35. size_t u_tsize; /* text size (pages) */
  36. size_t u_dsize; /* data size (pages) */
  37. size_t u_ssize; /* stack size (pages) */
  38. unsigned long start_code; /* text starting address */
  39. unsigned long start_data; /* data starting address */
  40. unsigned long start_stack; /* stack starting address */
  41. long int signal; /* signal causing core dump */
  42. unsigned long u_ar0; /* help gdb find registers */
  43. unsigned long magic; /* identifies a core file */
  44. char u_comm[32]; /* user command name */
  45. };
  46. #define NBPG PAGE_SIZE
  47. #define UPAGES 1
  48. #define HOST_TEXT_START_ADDR (u.start_code)
  49. #define HOST_DATA_START_ADDR (u.start_data)
  50. #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
  51. #endif /* _ASM_IA64_USER_H */