1  /* ptrace register data format definitions.
       2     Copyright (C) 1998-2023 Free Software Foundation, Inc.
       3     This file is part of the GNU C Library.
       4  
       5     The GNU C Library is free software; you can redistribute it and/or
       6     modify it under the terms of the GNU Lesser General Public
       7     License as published by the Free Software Foundation; either
       8     version 2.1 of the License, or (at your option) any later version.
       9  
      10     The GNU C Library is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13     Lesser General Public License for more details.
      14  
      15     You should have received a copy of the GNU Lesser General Public
      16     License along with the GNU C Library; if not, see
      17     <https://www.gnu.org/licenses/>.  */
      18  
      19  #ifndef _SYS_USER_H
      20  #define _SYS_USER_H	1
      21  
      22  /* The whole purpose of this file is for GDB and GDB only.  Don't read
      23     too much into it.  Don't use it for anything other than GDB unless
      24     you know what you are doing.  */
      25  
      26  struct user_fpregs
      27  {
      28  };
      29  
      30  struct user_regs
      31  {
      32    unsigned long int uregs[49];
      33  };
      34  
      35  struct user
      36  {
      37    struct user_regs regs;	/* General registers */
      38    int u_fpvalid;		/* True if math co-processor being used. */
      39  
      40    unsigned long int u_tsize;	/* Text segment size (pages). */
      41    unsigned long int u_dsize;	/* Data segment size (pages). */
      42    unsigned long int u_ssize;	/* Stack segment size (pages). */
      43  
      44    unsigned long start_code;	/* Starting virtual address of text. */
      45    unsigned long start_stack;	/* Starting virtual address of stack. */
      46  
      47    long int signal;     		/* Signal that caused the core dump. */
      48    int reserved;			/* No longer used */
      49    struct user_regs *u_ar0;	/* help gdb to find the general registers. */
      50  
      51    unsigned long magic;		/* uniquely identify a core file */
      52    char u_comm[32];		/* User command that was responsible */
      53    int u_debugreg[8];
      54    struct user_fpregs u_fp;	/* Floating point registers */
      55    struct user_fpregs *u_fp0;	/* help gdb to find the FP registers. */
      56  };
      57  
      58  #endif  /* sys/user.h */