David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 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 | |
| 14 | #include <asm/page.h> |
| 15 | #include <linux/ptrace.h> |
| 16 | |
| 17 | #ifndef __ASSEMBLY__ |
| 18 | /* |
| 19 | * When the kernel dumps core, it starts by dumping the user struct - this will |
| 20 | * be used by gdb to figure out where the data and stack segments are within |
| 21 | * the file, and what virtual addresses to use. |
| 22 | */ |
| 23 | struct user { |
| 24 | /* We start with the registers, to mimic the way that "memory" is |
| 25 | * returned from the ptrace(3,...) function. |
| 26 | */ |
| 27 | struct pt_regs regs; /* Where the registers are actually stored */ |
| 28 | |
| 29 | /* The rest of this junk is to help gdb figure out what goes where */ |
| 30 | unsigned long int u_tsize; /* Text segment size (pages). */ |
| 31 | unsigned long int u_dsize; /* Data segment size (pages). */ |
| 32 | unsigned long int u_ssize; /* Stack segment size (pages). */ |
| 33 | unsigned long start_code; /* Starting virtual address of text. */ |
| 34 | unsigned long start_stack; /* Starting virtual address of stack area. |
| 35 | This is actually the bottom of the stack, |
| 36 | the top of the stack is always found in the |
| 37 | esp register. */ |
| 38 | long int signal; /* Signal that caused the core dump. */ |
| 39 | int reserved; /* No longer used */ |
| 40 | struct user_pt_regs *u_ar0; /* Used by gdb to help find the values for */ |
| 41 | |
| 42 | /* the registers */ |
| 43 | unsigned long magic; /* To uniquely identify a core file */ |
| 44 | char u_comm[32]; /* User command that was responsible */ |
| 45 | }; |
| 46 | #endif |
| 47 | |
| 48 | #define NBPG PAGE_SIZE |
| 49 | #define UPAGES 1 |
| 50 | #define HOST_TEXT_START_ADDR +(u.start_code) |
| 51 | #define HOST_STACK_END_ADDR +(u.start_stack + u.u_ssize * NBPG) |
| 52 | |
| 53 | #endif /* _ASM_USER_H */ |