diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sigaction.c | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sys/ucontext.h | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c index 2571f1d..5e43121 100644 --- a/sysdeps/unix/sysv/linux/i386/sigaction.c +++ b/sysdeps/unix/sysv/linux/i386/sigaction.c @@ -148,12 +148,20 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact) weak_alias (__sigaction, sigaction) +/* NOTE: Please think twice before making any changes to the bits of + code below. GDB needs some intimate knowledge about it to + recognize them as signal trampolines, and make backtraces through + signal handlers work right. Important are both the names + (__restore and __restore_rt) and the exact instruction sequence. + If you ever feel the need to make any changes, please notify the + appropriate GDB maintainer. */ + #define RESTORE(name, syscall) RESTORE2 (name, syscall) #define RESTORE2(name, syscall) \ asm \ ( \ ".align 16\n" \ - "__" #name ":\n" \ + "__" #name ":\n" \ " movl $" #syscall ", %eax\n" \ " int $0x80" \ ); @@ -168,8 +176,8 @@ RESTORE (restore_rt, __NR_rt_sigreturn) # define RESTORE2(name, syscall) \ asm \ ( \ - ".align 8\n" \ - "__" #name ":\n" \ + ".align 8\n" \ + "__" #name ":\n" \ " popl %eax\n" \ " movl $" #syscall ", %eax\n" \ " int $0x80" \ diff --git a/sysdeps/unix/sysv/linux/i386/sys/ucontext.h b/sysdeps/unix/sysv/linux/i386/sys/ucontext.h index b6762ce..41fd60a 100644 --- a/sysdeps/unix/sysv/linux/i386/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/i386/sys/ucontext.h @@ -26,10 +26,6 @@ included in <signal.h>. */ #include <bits/sigcontext.h> -/* We also need the definition of the userlevel data representation - for the register contexts. */ -#include <sys/user.h> - /* Type for general register. */ typedef int greg_t; |