[xtensa-cvscommit] linux/include/asm-xtensa elf.h,1.1.1.1,1.2 ptrace.h,1.4,1.5
Brought to you by:
zankel
|
From: <joe...@us...> - 2003-01-25 03:12:49
|
Update of /cvsroot/xtensa/linux/include/asm-xtensa
In directory sc8-pr-cvs1:/tmp/cvs-serv9373/include/asm-xtensa
Modified Files:
elf.h ptrace.h
Log Message:
Kernel changes to support core dumps and a more efficient ptrace interface. TIE information is still missing.
Index: elf.h
===================================================================
RCS file: /cvsroot/xtensa/linux/include/asm-xtensa/elf.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** elf.h 28 Aug 2002 16:11:31 -0000 1.1.1.1
--- elf.h 25 Jan 2003 03:12:45 -0000 1.2
***************
*** 18,22 ****
#include <asm/ptrace.h>
- #include <asm/user.h>
#include <asm/page.h>
#include <xtensa/config/core.h>
--- 18,21 ----
***************
*** 26,32 ****
#define EM_XTENSA_OLD 0xABC7
! /* ELF register definitions */
- #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
/* TOTAL_CP_SIZE is a byte count. Round up ELF_NFPREG to the next
--- 25,62 ----
#define EM_XTENSA_OLD 0xABC7
! /* ELF register definitions. This is needed for core dump support. */
!
! /*
! * elf_gregset_t contains the application-level state in the following order:
! * Processor info: cpu_version, linux_version
! * Processor state: pc, ps, exccause, excvaddr, wb, ws,
! * lbeg, lend, lcount, sar
! * GP regs: ar0 - arXX
! */
!
! typedef unsigned int elf_greg_t;
!
! typedef struct elf_gregset_tag {
!
! elf_greg_t xchal_config_id0;
! elf_greg_t xchal_config_id1;
! elf_greg_t cpux;
! elf_greg_t cpuy;
! elf_greg_t pc;
! elf_greg_t ps;
! elf_greg_t exccause;
! elf_greg_t excvaddr;
! elf_greg_t wb;
! elf_greg_t ws;
! elf_greg_t lbeg;
! elf_greg_t lend;
! elf_greg_t lcount;
! elf_greg_t sar;
! elf_greg_t ar[XCHAL_NUM_AREGS];
!
! } elf_gregset_t;
!
! #define ELF_NGREG (sizeof(elf_gregset_t) / sizeof(elf_greg_t))
/* TOTAL_CP_SIZE is a byte count. Round up ELF_NFPREG to the next
***************
*** 45,53 ****
#define ELF_NFPREG (((TOTAL_CP_SIZE + 15) & ~15) / sizeof(elf_fpreg_t))
- typedef unsigned long elf_greg_t;
- typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
typedef double elf_fpreg_t;
! typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG] __attribute__ ((aligned(16)));
/*
--- 75,84 ----
#define ELF_NFPREG (((TOTAL_CP_SIZE + 15) & ~15) / sizeof(elf_fpreg_t))
typedef double elf_fpreg_t;
! typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
!
! #define ELF_CORE_COPY_REGS(_eregs, _pregs) xtensa_elf_core_copy_regs (&_eregs, _pregs);
! extern void xtensa_elf_core_copy_regs (elf_gregset_t *, struct pt_regs *);
!
/*
***************
*** 80,87 ****
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
-
- #define ELF_CORE_COPY_REGS(_dest,_regs) \
- memcpy((char *) &_dest, (char *) _regs, \
- sizeof(struct pt_regs));
/* This yields a mask that user programs can use to figure out what
--- 111,114 ----
Index: ptrace.h
===================================================================
RCS file: /cvsroot/xtensa/linux/include/asm-xtensa/ptrace.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ptrace.h 23 Sep 2002 19:17:50 -0000 1.4
--- ptrace.h 25 Jan 2003 03:12:45 -0000 1.5
***************
*** 17,42 ****
#include <xtensa/config/core.h>
- /* Registers used by ptrace */
- #define REG_A_BASE 0xfc000000
- #define REG_AR_BASE 0x04000000
- #define REG_PC 0x14000000
- #define REG_PS 0x080000e6
- #define REG_WB 0x08000048
- #define REG_WS 0x08000049
- #define REG_LBEG 0x08000000
- #define REG_LEND 0x08000001
- #define REG_LCOUNT 0x08000002
- #define REG_SAR 0x08000003
- #define REG_DEPC 0x080000c0
- #define REG_EXCCAUSE 0x080000e8
- #define REG_EXCVADDR 0x080000ee
- #define SYSCALL_NR 0x1
-
- /* Note: can return illegal A reg numbers, i.e. > 15 */
- #define AR_REGNO_TO_A_REGNO(ar_regno, wb) \
- ((int)(ar_regno - wb*4) >= 0 ? \
- ar_regno - wb*4 : \
- XCHAL_NUM_AREGS + ar_regno - wb*4)
-
/* Offsets from EXCSAVE_1 value: */
--- 17,20 ----
***************
*** 69,72 ****
--- 47,85 ----
#define EXCTYPE_QUICKSPILL_SHIFT 1
+
+ #if 0
+
+ /* XTFIXME: Old junk, removed in favor of the PTRACE_GETREGS method.
+ Delete after some time. [JET, 24 Jan 2003] */
+
+ /* Registers used by ptrace */
+ #define REG_A_BASE 0xfc000000
+ #define REG_AR_BASE 0x04000000
+ #define REG_PC 0x14000000
+ #define REG_PS 0x080000e6
+ #define REG_WB 0x08000048
+ #define REG_WS 0x08000049
+ #define REG_LBEG 0x08000000
+ #define REG_LEND 0x08000001
+ #define REG_LCOUNT 0x08000002
+ #define REG_SAR 0x08000003
+ #define REG_DEPC 0x080000c0
+ #define REG_EXCCAUSE 0x080000e8
+ #define REG_EXCVADDR 0x080000ee
+ #define SYSCALL_NR 0x1
+
+ /* Note: can return illegal A reg numbers, i.e. > 15 */
+ #define AR_REGNO_TO_A_REGNO(ar_regno, wb) \
+ ((int)(ar_regno - wb*4) >= 0 ? \
+ ar_regno - wb*4 : \
+ XCHAL_NUM_AREGS + ar_regno - wb*4)
+
+ #endif /* if 0 */
+
+ /* Other PTRACE_* values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
+ #define PTRACE_GETREGS 12
+ #define PTRACE_SETREGS 13
+ #define PTRACE_GETFPREGS 14
+ #define PTRACE_SETFPREGS 15
#ifndef __ASSEMBLY__
|