1 /* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <http://www.gnu.org/licenses/>. */
23 /* The whole purpose of this file is for GDB and GDB only. Don't read
24 too much into it. Don't use it for anything other than GDB unless
25 you know what you are doing. */
27 /* #include <asm/reg.h> */
28 /* Instead of including the kernel header, that will vary depending on
29 whether the 32- or the 64-bit kernel is installed, we paste its
30 contents here. Note that the fact that the file is inline here,
31 instead of included separately, doesn't change in any way the
32 licensing status of a program that includes user.h. Since this is
33 for gdb alone, and gdb is GPLed, no surprises here. */
34 #if _MIPS_SIM == _ABIO32
36 * Various register offset definitions for debuggers, core file
37 * examiners and whatnot.
39 * This file is subject to the terms and conditions of the GNU General Public
40 * License. See the file "COPYING" in the main directory of this archive
43 * Copyright (C) 1995, 1999 by Ralf Baechle
45 #ifndef __ASM_MIPS_REG_H
46 #define __ASM_MIPS_REG_H
49 * This defines/structures correspond to the register layout on stack -
50 * if the order here is changed, it needs to be updated in
51 * include/asm-mips/stackframe.h
88 * Saved special registers
94 #define EF_CP0_BADVADDR 41
95 #define EF_CP0_STATUS 42
96 #define EF_CP0_CAUSE 43
98 #define EF_SIZE 180 /* size in bytes */
100 #endif /* __ASM_MIPS_REG_H */
102 #else /* _MIPS_SIM != _ABIO32 */
105 * Various register offset definitions for debuggers, core file
106 * examiners and whatnot.
108 * This file is subject to the terms and conditions of the GNU General Public
109 * License. See the file "COPYING" in the main directory of this archive
112 * Copyright (C) 1995, 1999 Ralf Baechle
113 * Copyright (C) 1995, 1999 Silicon Graphics
119 * This defines/structures correspond to the register layout on stack -
120 * if the order here is changed, it needs to be updated in
121 * include/asm-mips/stackframe.h
158 * Saved special registers
163 #define EF_CP0_EPC 34
164 #define EF_CP0_BADVADDR 35
165 #define EF_CP0_STATUS 36
166 #define EF_CP0_CAUSE 37
168 #define EF_SIZE 304 /* size in bytes */
170 #endif /* _ASM_REG_H */
172 #endif /* _MIPS_SIM != _ABIO32 */
174 #if _MIPS_SIM == _ABIO32
178 unsigned long regs
[EF_SIZE
/4+64]; /* integer and fp regs */
179 size_t u_tsize
; /* text size (pages) */
180 size_t u_dsize
; /* data size (pages) */
181 size_t u_ssize
; /* stack size (pages) */
182 unsigned long start_code
; /* text starting address */
183 unsigned long start_data
; /* data starting address */
184 unsigned long start_stack
; /* stack starting address */
185 long int signal
; /* signal causing core dump */
186 void* u_ar0
; /* help gdb find registers */
187 unsigned long magic
; /* identifies a core file */
188 char u_comm
[32]; /* user command name */
194 __extension__
unsigned long regs
[EF_SIZE
/8+64]; /* integer and fp regs */
195 __extension__
unsigned long u_tsize
; /* text size (pages) */
196 __extension__
unsigned long u_dsize
; /* data size (pages) */
197 __extension__
unsigned long u_ssize
; /* stack size (pages) */
198 __extension__
unsigned long long start_code
; /* text starting address */
199 __extension__
unsigned long long start_data
; /* data starting address */
200 __extension__
unsigned long long start_stack
; /* stack starting address */
201 __extension__
long long signal
; /* signal causing core dump */
202 __extension__
unsigned long long u_ar0
; /* help gdb find registers */
203 __extension__
unsigned long long magic
; /* identifies a core file */
204 char u_comm
[32]; /* user command name */
209 #define PAGE_SHIFT 12
210 #define PAGE_SIZE (1UL << PAGE_SHIFT)
211 #define PAGE_MASK (~(PAGE_SIZE-1))
212 #define NBPG PAGE_SIZE
214 #define HOST_TEXT_START_ADDR (u.start_code)
215 #define HOST_DATA_START_ADDR (u.start_data)
216 #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
218 #endif /* _SYS_USER_H */