~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/frv/include/asm/user.h

Version: ~ [ linux-5.8-rc4 ] ~ [ linux-5.7.7 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.50 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.131 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.187 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.229 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.229 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* user.h: FR-V core file format stuff
  2  *
  3  * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
  4  * Written by David Howells (dhowells@redhat.com)
  5  *
  6  * This program is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU General Public License
  8  * as published by the Free Software Foundation; either version
  9  * 2 of the License, 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 <asm/registers.h>
 16 
 17 /* Core file format: The core file is written in such a way that gdb
 18  * can understand it and provide useful information to the user (under
 19  * linux we use the 'trad-core' bfd).  There are quite a number of
 20  * obstacles to being able to view the contents of the floating point
 21  * registers, and until these are solved you will not be able to view
 22  * the contents of them.  Actually, you can read in the core file and
 23  * look at the contents of the user struct to find out what the
 24  * floating point registers contain.
 25  *
 26  * The actual file contents are as follows:
 27  * UPAGE:
 28  *   1 page consisting of a user struct that tells gdb what is present
 29  *   in the file.  Directly after this is a copy of the task_struct,
 30  *   which is currently not used by gdb, but it may come in useful at
 31  *   some point.  All of the registers are stored as part of the
 32  *   upage.  The upage should always be only one page.
 33  *
 34  * DATA:
 35  *   The data area is stored.  We use current->end_text to
 36  *   current->brk to pick up all of the user variables, plus any
 37  *   memory that may have been malloced.  No attempt is made to
 38  *   determine if a page is demand-zero or if a page is totally
 39  *   unused, we just cover the entire range.  All of the addresses are
 40  *   rounded in such a way that an integral number of pages is
 41  *   written.
 42  *
 43  * STACK:
 44  *   We need the stack information in order to get a meaningful
 45  *   backtrace.  We need to write the data from (esp) to
 46  *   current->start_stack, so we round each of these off in order to
 47  *   be able to write an integer number of pages.  The minimum core
 48  *   file size is 3 pages, or 12288 bytes.
 49  */
 50 
 51 /* When the kernel dumps core, it starts by dumping the user struct -
 52  * this will be used by gdb to figure out where the data and stack segments
 53  *  are within the file, and what virtual addresses to use.
 54  */
 55 struct user {
 56         /* We start with the registers, to mimic the way that "memory" is returned
 57          * from the ptrace(3,...) function.  */
 58         struct user_context     regs;
 59 
 60         /* The rest of this junk is to help gdb figure out what goes where */
 61         unsigned long           u_tsize;        /* Text segment size (pages). */
 62         unsigned long           u_dsize;        /* Data segment size (pages). */
 63         unsigned long           u_ssize;        /* Stack segment size (pages). */
 64         unsigned long           start_code;     /* Starting virtual address of text. */
 65         unsigned long           start_stack;    /* Starting virtual address of stack area.
 66                                                  * This is actually the bottom of the stack,
 67                                                  * the top of the stack is always found in the
 68                                                  * esp register.  */
 69         long int                signal;         /* Signal that caused the core dump. */
 70 
 71         unsigned long           magic;          /* To uniquely identify a core file */
 72         char                    u_comm[32];     /* User command that was responsible */
 73 };
 74 
 75 #define NBPG                    PAGE_SIZE
 76 #define UPAGES                  1
 77 #define HOST_TEXT_START_ADDR    (u.start_code)
 78 #define HOST_STACK_END_ADDR     (u.start_stack + u.u_ssize * NBPG)
 79 
 80 #endif
 81 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp