Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2002-03-27  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h (struct
	sigcontext): Follow further kernel change.

	* sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h: Follow further
	kernel change.

	* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h (GET_STACK):
	Change for struct sigcontext change.

	* sysdeps/unix/sysv/linux/x86_64/register-dump.h (register_dump):
	Follow changes in struct sigcontext.

	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Remove ptrace
	sysycall, use wrapper instead.
  • Loading branch information
Andreas Jaeger committed Mar 27, 2002
1 parent 49f8b03 commit 46a1b87
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 34 deletions.
17 changes: 17 additions & 0 deletions ChangeLog
@@ -1,3 +1,20 @@
2002-03-27 Andreas Jaeger <aj@suse.de>

* sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h (struct
sigcontext): Follow further kernel change.

* sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h: Follow further
kernel change.

* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h (GET_STACK):
Change for struct sigcontext change.

* sysdeps/unix/sysv/linux/x86_64/register-dump.h (register_dump):
Follow changes in struct sigcontext.

* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Remove ptrace
sysycall, use wrapper instead.

2002-03-26 Andreas Jaeger <aj@suse.de>

* sysdeps/i386/i486/bits/string.h (__memcpy_by4): Describe memory
Expand Down
8 changes: 4 additions & 4 deletions sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h
Expand Up @@ -134,10 +134,10 @@ struct sigcontext
unsigned long rsp;
unsigned long rip;
unsigned long eflags;
unsigned short cs, __csh;
unsigned short gs, __gsh;
unsigned short fs, __fsh;
unsigned int __pad0;
unsigned short cs;
unsigned short gs;
unsigned short fs;
unsigned short __pad0;
unsigned long err;
unsigned long trapno;
unsigned long oldmask;
Expand Down
35 changes: 13 additions & 22 deletions sysdeps/unix/sysv/linux/x86_64/register-dump.h
Expand Up @@ -67,7 +67,7 @@ hexvalue (unsigned long int value, char *buf, size_t len)
static void
register_dump (int fd, struct sigcontext *ctx)
{
char regs[29][16];
char regs[25][16];
char fpregs[30][8];
char xmmregs[16][32];
struct iovec iov[147];
Expand Down Expand Up @@ -104,16 +104,13 @@ register_dump (int fd, struct sigcontext *ctx)

hexvalue (ctx->eflags, regs[17], 8);
hexvalue (ctx->cs, regs[18], 4);
hexvalue (ctx->ds, regs[19], 4);
hexvalue (ctx->es, regs[20], 4);
hexvalue (ctx->fs, regs[21], 4);
hexvalue (ctx->gs, regs[22], 4);
hexvalue (ctx->fs, regs[19], 4);
hexvalue (ctx->gs, regs[20], 4);
/* hexvalue (ctx->ss, regs[23], 4); */
hexvalue (ctx->trapno, regs[24], 8);
hexvalue (ctx->err, regs[25], 8);
hexvalue (ctx->oldmask, regs[26], 8);
hexvalue (ctx->rsp_at_signal, regs[27], 16);
hexvalue (ctx->cr2, regs[28], 8);
hexvalue (ctx->trapno, regs[21], 8);
hexvalue (ctx->err, regs[22], 8);
hexvalue (ctx->oldmask, regs[23], 8);
hexvalue (ctx->cr2, regs[24], 8);

/* Generate the output. */
ADD_STRING ("Register dump:\n\n RAX: ");
Expand Down Expand Up @@ -154,28 +151,22 @@ register_dump (int fd, struct sigcontext *ctx)
ADD_MEM (regs[17], 8);
ADD_STRING ("\n\n CS: ");
ADD_MEM (regs[18], 4);
ADD_STRING (" DS: ");
ADD_MEM (regs[19], 4);
ADD_STRING (" ES: ");
ADD_MEM (regs[20], 4);
ADD_STRING (" FS: ");
ADD_MEM (regs[21], 4);
ADD_MEM (regs[19], 4);
ADD_STRING (" GS: ");
ADD_MEM (regs[22], 4);
ADD_MEM (regs[20], 4);
/*
ADD_STRING (" SS: ");
ADD_MEM (regs[23], 4);
*/
ADD_STRING ("\n\n Trap: ");
ADD_MEM (regs[24], 8);
ADD_MEM (regs[21], 8);
ADD_STRING (" Error: ");
ADD_MEM (regs[25], 8);
ADD_MEM (regs[22], 8);
ADD_STRING (" OldMask: ");
ADD_MEM (regs[26], 8);
ADD_STRING ("\n RSP/signal: ");
ADD_MEM (regs[27], 8);
ADD_MEM (regs[23], 8);
ADD_STRING (" CR2: ");
ADD_MEM (regs[28], 8);
ADD_MEM (regs[24], 8);

if (ctx->fpstate != NULL)
{
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
@@ -1,4 +1,4 @@
/* Copyright (C) 2001 Free Software Foundation, Inc.
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -20,7 +20,7 @@
#define SIGCONTEXT_EXTRA_ARGS
#define GET_PC(ctx) ((void *) ctx.rip)
#define GET_FRAME(ctx) ((void *) ctx.rbp)
#define GET_STACK(ctx) ((void *) ctx.rsp_at_signal)
#define GET_STACK(ctx) ((void *) ctx.rsp)

#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
8 changes: 3 additions & 5 deletions sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
Expand Up @@ -33,7 +33,7 @@
typedef long int greg_t;

/* Number of general registers. */
#define NGREG 27
#define NGREG 21

/* Container for all general registers. */
typedef greg_t gregset_t[NGREG];
Expand Down Expand Up @@ -78,10 +78,8 @@ enum
# define REG_RIP REG_RIP
REG_EFL,
# define REG_EFL REG_EFL
REG_CSGS, /* Actually short cs, __csh, gs, __gsh. */
# define REG_CSGS REG_CSGS
REG_FS, /* Actually short gs, __fsh, pad. */
# define REG_FS REG_FS
REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */
# define REG_CSGSFS REG_CSGSFS
REG_ERR,
# define REG_ERR REG_ERR
REG_TRAPNO
Expand Down
1 change: 0 additions & 1 deletion sysdeps/unix/sysv/linux/x86_64/syscalls.list
Expand Up @@ -13,7 +13,6 @@ getrlimit - getrlimit i:ip __getrlimit getrlimit getrlimit64
setrlimit - setrlimit i:ip __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
truncate - truncate i:si truncate truncate64
ptrace - ptrace i:iipp __ptrace ptrace

# semaphore and shm system calls
msgctl - msgctl i:iip __msgctl msgctl
Expand Down

0 comments on commit 46a1b87

Please sign in to comment.