162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef _ASM_IA64_USER_H 362306a36Sopenharmony_ci#define _ASM_IA64_USER_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * Core file format: The core file is written in such a way that gdb 762306a36Sopenharmony_ci * can understand it and provide useful information to the user (under 862306a36Sopenharmony_ci * linux we use the `trad-core' bfd). The file contents are as 962306a36Sopenharmony_ci * follows: 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * upage: 1 page consisting of a user struct that tells gdb 1262306a36Sopenharmony_ci * what is present in the file. Directly after this is a 1362306a36Sopenharmony_ci * copy of the task_struct, which is currently not used by gdb, 1462306a36Sopenharmony_ci * but it may come in handy at some point. All of the registers 1562306a36Sopenharmony_ci * are stored as part of the upage. The upage should always be 1662306a36Sopenharmony_ci * only one page long. 1762306a36Sopenharmony_ci * data: The data segment follows next. We use current->end_text to 1862306a36Sopenharmony_ci * current->brk to pick up all of the user variables, plus any memory 1962306a36Sopenharmony_ci * that may have been sbrk'ed. No attempt is made to determine if a 2062306a36Sopenharmony_ci * page is demand-zero or if a page is totally unused, we just cover 2162306a36Sopenharmony_ci * the entire range. All of the addresses are rounded in such a way 2262306a36Sopenharmony_ci * that an integral number of pages is written. 2362306a36Sopenharmony_ci * stack: We need the stack information in order to get a meaningful 2462306a36Sopenharmony_ci * backtrace. We need to write the data from usp to 2562306a36Sopenharmony_ci * current->start_stack, so we round each of these in order to be able 2662306a36Sopenharmony_ci * to write an integer number of pages. 2762306a36Sopenharmony_ci * 2862306a36Sopenharmony_ci * Modified 1998, 1999, 2001 2962306a36Sopenharmony_ci * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#include <linux/ptrace.h> 3362306a36Sopenharmony_ci#include <linux/types.h> 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#include <asm/page.h> 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#define EF_SIZE 3072 /* XXX fix me */ 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_cistruct user { 4062306a36Sopenharmony_ci unsigned long regs[EF_SIZE/8+32]; /* integer and fp regs */ 4162306a36Sopenharmony_ci size_t u_tsize; /* text size (pages) */ 4262306a36Sopenharmony_ci size_t u_dsize; /* data size (pages) */ 4362306a36Sopenharmony_ci size_t u_ssize; /* stack size (pages) */ 4462306a36Sopenharmony_ci unsigned long start_code; /* text starting address */ 4562306a36Sopenharmony_ci unsigned long start_data; /* data starting address */ 4662306a36Sopenharmony_ci unsigned long start_stack; /* stack starting address */ 4762306a36Sopenharmony_ci long int signal; /* signal causing core dump */ 4862306a36Sopenharmony_ci unsigned long u_ar0; /* help gdb find registers */ 4962306a36Sopenharmony_ci unsigned long magic; /* identifies a core file */ 5062306a36Sopenharmony_ci char u_comm[32]; /* user command name */ 5162306a36Sopenharmony_ci}; 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci#endif /* _ASM_IA64_USER_H */ 54