Patchwork Remove unused frame.h header, sigcontextinfo.h macros

login
register
mail settings
Submitter Joseph Myers
Date March 21, 2018, 9:50 p.m.
Message ID <alpine.DEB.2.20.1803212149500.3411@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/26412/
State New
Headers show

Comments

Joseph Myers - March 21, 2018, 9:50 p.m.
The glibc-internal header frame.h was used in the old
debug/backtrace.c but is now unused.  Similarly, there are some
sigcontextinfo.h macros that are used nowhere in glibc -
ADVANCE_STACK_FRAME and FIRST_FRAME_POINTER were used in the old
debug/backtrace.c, while SIGCONTEXT_EXTRA_ARGS, GET_FRAME, GET_STACK
and CALL_SIGHANDLER were unused even before the removal of that old
implementation (beyond uses of SIGCONTEXT_EXTRA_ARGS in definitions of
CALL_SIGHANDLER).  This patch removes all the unused frame.h headers
and definitions of those macros.

Tested with build-many-glibcs.py.

2018-03-21  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/generic/frame.h: Remove file.
	* sysdeps/arm/frame.h: Likewise.
	* sysdeps/hppa/frame.h: Likewise.
	* sysdeps/generic/sigcontextinfo.h (SIGCONTEXT_EXTRA_ARGS): Remove
	macro.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/mach/hurd/i386/sigcontextinfo.h (SIGCONTEXT_EXTRA_ARGS):
	Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(ADVANCE_STACK_FRAME): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(FIRST_FRAME_POINTER): Likewise.
	(ADVANCE_STACK_FRAME): Likewise.
	(GET_STACK): Likewise.
	(GET_FRAME): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(ADVANCE_STACK_FRAME): Likewise.
	(GET_STACK): Likewise.
	(GET_FRAME): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
	(SIGCONTEXT_EXTRA_ARGS): Likewise.
	(GET_FRAME): Likewise.
	(GET_STACK): Likewise.
	(CALL_SIGHANDLER): Likewise.
Adhemerval Zanella Netto - March 22, 2018, 6:15 a.m.
On 22/03/2018 05:50, Joseph Myers wrote:
> The glibc-internal header frame.h was used in the old
> debug/backtrace.c but is now unused.  Similarly, there are some
> sigcontextinfo.h macros that are used nowhere in glibc -
> ADVANCE_STACK_FRAME and FIRST_FRAME_POINTER were used in the old
> debug/backtrace.c, while SIGCONTEXT_EXTRA_ARGS, GET_FRAME, GET_STACK
> and CALL_SIGHANDLER were unused even before the removal of that old
> implementation (beyond uses of SIGCONTEXT_EXTRA_ARGS in definitions of
> CALL_SIGHANDLER).  This patch removes all the unused frame.h headers
> and definitions of those macros.
> 
> Tested with build-many-glibcs.py.

LGTM.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> 
> 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/generic/frame.h: Remove file.
> 	* sysdeps/arm/frame.h: Likewise.
> 	* sysdeps/hppa/frame.h: Likewise.
> 	* sysdeps/generic/sigcontextinfo.h (SIGCONTEXT_EXTRA_ARGS): Remove
> 	macro.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/mach/hurd/i386/sigcontextinfo.h (SIGCONTEXT_EXTRA_ARGS):
> 	Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(ADVANCE_STACK_FRAME): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(FIRST_FRAME_POINTER): Likewise.
> 	(ADVANCE_STACK_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(GET_FRAME): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(ADVANCE_STACK_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(GET_FRAME): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 	* sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
> 	(SIGCONTEXT_EXTRA_ARGS): Likewise.
> 	(GET_FRAME): Likewise.
> 	(GET_STACK): Likewise.
> 	(CALL_SIGHANDLER): Likewise.
> 
> diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h
> deleted file mode 100644
> index caf3bf1..0000000
> --- a/sysdeps/arm/frame.h
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/* Definition of stack frame structure.  ARM/APCS version.
> -   Copyright (C) 2000-2018 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
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library.  If not, see
> -   <http://www.gnu.org/licenses/>.  */
> -
> -/* This is the APCS stack backtrace structure.  */
> -struct layout
> -{
> -  struct layout *next;
> -  void *sp;
> -  void *return_address;
> -};
> -
> -#define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0))
> diff --git a/sysdeps/generic/frame.h b/sysdeps/generic/frame.h
> deleted file mode 100644
> index e47b001..0000000
> --- a/sysdeps/generic/frame.h
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -/* Definition of stack frame structure.  Generic version.
> -   Copyright (C) 2000-2018 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
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library; if not, see
> -   <http://www.gnu.org/licenses/>.  */
> -
> -struct layout
> -{
> -  void *next;
> -  void *return_address;
> -};
> diff --git a/sysdeps/generic/sigcontextinfo.h b/sysdeps/generic/sigcontextinfo.h
> index 078b034..3e19941 100644
> --- a/sysdeps/generic/sigcontextinfo.h
> +++ b/sysdeps/generic/sigcontextinfo.h
> @@ -18,9 +18,4 @@
>  
>  /* In general we cannot provide any information.  */
>  #define SIGCONTEXT struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(ctx)	((void *) 0)
> -#define GET_FRAME(ctx)	((void *) 0)
> -#define GET_STACK(ctx)	((void *) 0)
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h
> deleted file mode 100644
> index 2b357f0..0000000
> --- a/sysdeps/hppa/frame.h
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/* Definition of stack frame structure.  HPPA version.
> -   Copyright (C) 2000-2018 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
> -   modify it under the terms of the GNU Lesser General Public
> -   License as published by the Free Software Foundation; either
> -   version 2.1 of the License, or (at your option) any later version.
> -
> -   The GNU C Library is distributed in the hope that it will be useful,
> -   but WITHOUT ANY WARRANTY; without even the implied warranty of
> -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> -   Lesser General Public License for more details.
> -
> -   You should have received a copy of the GNU Lesser General Public
> -   License along with the GNU C Library.  If not, see
> -   <http://www.gnu.org/licenses/>.  */
> -
> -/* PA stacks grow upwards. */
> -#define INNER_THAN >
> -
> -/* FIXME: will verify this later */
> -struct layout
> -{
> -  void *next;
> -  void *return_address;
> -};
> diff --git a/sysdeps/mach/hurd/i386/sigcontextinfo.h b/sysdeps/mach/hurd/i386/sigcontextinfo.h
> index 9842ecc..836ecb2 100644
> --- a/sysdeps/mach/hurd/i386/sigcontextinfo.h
> +++ b/sysdeps/mach/hurd/i386/sigcontextinfo.h
> @@ -16,9 +16,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT struct sigcontext
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(ctx)	((void *) (ctx).sc_eip)
> -#define GET_FRAME(ctx)	((void *) (ctx).sc_ebp)
> -#define GET_STACK(ctx)	((void *) (ctx).sc_uesp)
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
> index 23f66d0..a0a57f3 100644
> --- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
> @@ -16,9 +16,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT int _code, struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS _code,
>  #define GET_PC(ctx)	((void *) (ctx)->sc_pc)
> -#define GET_FRAME(ctx)	((void *) (ctx)->sc_regs[15])
> -#define GET_STACK(ctx)	((void *) (ctx)->sc_regs[30])
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
> index daf9bd3..b8e79c2 100644
> --- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
> @@ -19,21 +19,12 @@
>  #include <sys/ucontext.h>
>  
>  #define SIGCONTEXT siginfo_t *_si, ucontext_t *
> -#define SIGCONTEXT_EXTRA_ARGS _si,
>  
>  /* The sigcontext structure changed between 2.0 and 2.1 kernels.  On any
>     modern system we should be able to assume that the "new" format will be
>     in use.  */
>  
>  #define GET_PC(ctx)	((void *) (ctx)->uc_mcontext.arm_pc)
> -#define GET_FRAME(ctx)	ADVANCE_STACK_FRAME ((void *) ctx->uc_mcontext.arm_fp)
> -#define GET_STACK(ctx)	((void *) (ctx)->uc_mcontext.arm_sp)
> -
> -#define ADVANCE_STACK_FRAME(frm)	\
> -			((struct layout *)frm - 1)
> -
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
>  
>  /* There is no reliable way to get the sigcontext unless we use a
>     three-argument signal handler.  */
> diff --git a/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h b/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
> index a4ed29a..5dee976 100644
> --- a/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
> @@ -17,34 +17,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT struct sigcontext
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(ctx)	((void *) ctx.eip)
> -#define GET_FRAME(ctx)	((void *) ctx.ebp)
> -#define GET_STACK(ctx)	((void *) ctx.esp_at_signal)
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -do {									      \
> -  int __tmp1, __tmp2, __tmp3, __tmp4;					      \
> -  __asm __volatile ("movl\t%%esp, %%edi\n\t"				      \
> -		    "andl\t$-16, %%esp\n\t"				      \
> -		    "subl\t%8, %%esp\n\t"				      \
> -		    "movl\t%%edi, %c8-4(%%esp)\n\t"			      \
> -		    "movl\t%1, 0(%%esp)\n\t"				      \
> -		    "leal\t4(%%esp), %%edi\n\t"				      \
> -		    "cld\n\t"						      \
> -		    "rep\tmovsl\n\t"					      \
> -		    "call\t*%0\n\t"					      \
> -		    "cld\n\t"						      \
> -		    "movl\t%9, %%ecx\n\t"				      \
> -		    "subl\t%%edi, %%esi\n\t"				      \
> -		    "leal\t4(%%esp,%%esi,1), %%edi\n\t"			      \
> -		    "leal\t4(%%esp), %%esi\n\t"				      \
> -		    "rep\tmovsl\n\t"					      \
> -		    "movl\t%c8-4(%%esp), %%esp\n\t"			      \
> -		    : "=a" (__tmp1), "=d" (__tmp2), "=S" (__tmp3),	      \
> -		      "=c" (__tmp4)					      \
> -		    : "0" (handler), "1" (signo), "2" (&ctx),		      \
> -		      "3" (sizeof (struct sigcontext) / 4),		      \
> -		      "n" ((sizeof (struct sigcontext) + 19) & ~15),	      \
> -		      "i" (sizeof (struct sigcontext) / 4)		      \
> -		    : "cc", "edi");					      \
> -} while (0)
> diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
> index 214292d..4163aa3 100644
> --- a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
> @@ -16,10 +16,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT siginfo_t *_si, struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS _si,
>  #define GET_PC(ctx)	((ctx)->sc_ip)
> -#define GET_FRAME(ctx)	((void *) 0)
> -#define GET_STACK(ctx)	((void *) 0)
> -
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
> index 58374ed..98e28be 100644
> --- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
> @@ -17,9 +17,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT int _code, struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS _code,
>  #define GET_PC(ctx)	((void *) (ctx)->sc_pc)
> -#define GET_FRAME(ctx)	((void *) __builtin_frame_address (1))
> -#define GET_STACK(ctx)	((void *) (ctx)->sc_usp)
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h b/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
> index 64d8f2f..c99d0d7 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
> @@ -17,9 +17,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT int _code, ucontext_t *
> -#define SIGCONTEXT_EXTRA_ARGS _code,
>  #define GET_PC(ctx)    ((void *) (ctx)->uc_mcontext.regs.pc)
> -#define GET_FRAME(ctx) ((void *) (ctx)->uc_mcontext.regs.sp)
> -#define GET_STACK(ctx) ((void *) (ctx)->uc_mcontext.regs.sp)
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
> index d183a33..fb6e71b 100644
> --- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
> @@ -22,21 +22,11 @@
>  #if _MIPS_SIM == _ABIO32
>  
>  #define SIGCONTEXT unsigned long _code, struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS _code,
>  #define GET_PC(ctx)	((void *) (unsigned long) ctx->sc_pc)
> -#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->sc_regs[30])
> -#define GET_STACK(ctx)	((void *) (unsigned long) ctx->sc_regs[29])
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
>  
>  #else
>  
>  #define SIGCONTEXT unsigned long _code, ucontext_t *
> -#define SIGCONTEXT_EXTRA_ARGS _code,
>  #define GET_PC(ctx)	((void *) (unsigned long) ctx->uc_mcontext.pc)
> -#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[30])
> -#define GET_STACK(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[29])
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
>  
>  #endif
> diff --git a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
> index 72381e3..0b682c7 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
> @@ -18,9 +18,4 @@
>  #include <signal.h>
>  
>  #define SIGCONTEXT struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(ctx)	((void *)((ctx)->regs->nip))
> -#define GET_FRAME(ctx)	(*(void **)((ctx)->regs->gpr[1]))
> -#define GET_STACK(ctx)	((void *)((ctx)->regs->gpr[1]))
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h b/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
> index 3ca8a80..1476953 100644
> --- a/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
> @@ -19,10 +19,4 @@
>  #include <sys/ucontext.h>
>  
>  #define SIGCONTEXT siginfo_t *_si, ucontext_t *
> -#define SIGCONTEXT_EXTRA_ARGS _si,
>  #define GET_PC(ctx)	((void *) ctx->uc_mcontext.__gregs[REG_PC])
> -#define GET_FRAME(ctx)	((void *) ctx->uc_mcontext.__gregs[REG_S0])
> -#define GET_STACK(ctx)	((void *) ctx->uc_mcontext.__gregs[REG_SP])
> -
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h b/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
> index 2533e63..0826e58 100644
> --- a/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
> @@ -19,9 +19,4 @@
>  #include <signal.h>
>  
>  #define SIGCONTEXT struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(ctx)	((void *)((ctx)->sregs->regs.psw.addr))
> -#define GET_FRAME(ctx)	(*(void **)((ctx)->sregs->regs.gprs[11]))
> -#define GET_STACK(ctx)	((void *)((ctx)->sregs->regs.gprs[15]))
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h b/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
> index d6dd48d..3f33b7f 100644
> --- a/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
> @@ -18,9 +18,4 @@
>  
>  #define SIGCONTEXT int _a2, int _a3, int _a4, struct sigcontext
>  
> -#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
>  #define GET_PC(ctx)	((void *) ctx.sc_pc)
> -#define GET_FRAME(ctx)	((void *) ctx.sc_regs[14])
> -#define GET_STACK(ctx)	((void *) ctx.sc_regs[15])
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
> index 91233b8..1c32abf 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
> @@ -17,15 +17,4 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  #define SIGCONTEXT struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(__ctx)	((void *) ((__ctx)->si_regs.pc))
> -#define FIRST_FRAME_POINTER \
> -  ({ void *ret;							\
> -     asm volatile ("ta 3; add %%fp, 56, %0" : "=r" (ret)); ret; })
> -#define ADVANCE_STACK_FRAME(__next) \
> -	((void *) (((unsigned *)(__next))+14))
> -
> -#define GET_STACK(__ctx)	((void *) (__ctx)->si_regs.u_regs[14])
> -#define GET_FRAME(__ctx)	ADVANCE_STACK_FRAME (GET_STACK(__ctx))
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
> index c9d2685..32066eb 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
> @@ -20,12 +20,4 @@
>  #define STACK_BIAS 2047
>  #endif
>  #define SIGCONTEXT struct sigcontext *
> -#define SIGCONTEXT_EXTRA_ARGS
>  #define GET_PC(__ctx)	((void *) ((__ctx)->sigc_regs.tpc))
> -#define ADVANCE_STACK_FRAME(__next) \
> -	((void *) (((unsigned long *) (((unsigned long int) (__next))     \
> -					   + STACK_BIAS))+14))
> -#define GET_STACK(__ctx)	((void *) ((__ctx)->sigc_regs.u_regs[14]))
> -#define GET_FRAME(__ctx)	ADVANCE_STACK_FRAME (GET_STACK (__ctx))
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
> index 82bc0c7..b23b846 100644
> --- a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
> @@ -19,9 +19,4 @@
>  #include <arch/abi.h>
>  
>  #define SIGCONTEXT siginfo_t *_si, ucontext_t *
> -#define SIGCONTEXT_EXTRA_ARGS _si,
>  #define GET_PC(ctx)	((void *) (long) ctx->uc_mcontext.pc)
> -#define GET_FRAME(ctx)	((void *) (long) ctx->uc_mcontext.regs[TREG_FP])
> -#define GET_STACK(ctx)	((void *) (long) ctx->uc_mcontext.sp)
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
> diff --git a/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
> index 41ace60..165d6b0 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
> +++ b/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
> @@ -18,13 +18,5 @@
>  #include <stdint.h>
>  
>  #define SIGCONTEXT siginfo_t *_si, ucontext_t *
> -#define SIGCONTEXT_EXTRA_ARGS _si,
>  #define GET_PC(ctx)	\
>    ((void *) (uintptr_t) (ctx)->uc_mcontext.gregs[REG_RIP])
> -#define GET_FRAME(ctx)	\
> -  ((void *) (uintptr_t) (ctx)->uc_mcontext.gregs[REG_RBP])
> -#define GET_STACK(ctx)	\
> -  ((void *) (uintptr_t) (ctx)->uc_mcontext.gregs[REG_RSP])
> -
> -#define CALL_SIGHANDLER(handler, signo, ctx) \
> -  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
>

Patch

diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h
deleted file mode 100644
index caf3bf1..0000000
--- a/sysdeps/arm/frame.h
+++ /dev/null
@@ -1,27 +0,0 @@ 
-/* Definition of stack frame structure.  ARM/APCS version.
-   Copyright (C) 2000-2018 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* This is the APCS stack backtrace structure.  */
-struct layout
-{
-  struct layout *next;
-  void *sp;
-  void *return_address;
-};
-
-#define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0))
diff --git a/sysdeps/generic/frame.h b/sysdeps/generic/frame.h
deleted file mode 100644
index e47b001..0000000
--- a/sysdeps/generic/frame.h
+++ /dev/null
@@ -1,23 +0,0 @@ 
-/* Definition of stack frame structure.  Generic version.
-   Copyright (C) 2000-2018 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-struct layout
-{
-  void *next;
-  void *return_address;
-};
diff --git a/sysdeps/generic/sigcontextinfo.h b/sysdeps/generic/sigcontextinfo.h
index 078b034..3e19941 100644
--- a/sysdeps/generic/sigcontextinfo.h
+++ b/sysdeps/generic/sigcontextinfo.h
@@ -18,9 +18,4 @@ 
 
 /* In general we cannot provide any information.  */
 #define SIGCONTEXT struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(ctx)	((void *) 0)
-#define GET_FRAME(ctx)	((void *) 0)
-#define GET_STACK(ctx)	((void *) 0)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h
deleted file mode 100644
index 2b357f0..0000000
--- a/sysdeps/hppa/frame.h
+++ /dev/null
@@ -1,27 +0,0 @@ 
-/* Definition of stack frame structure.  HPPA version.
-   Copyright (C) 2000-2018 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* PA stacks grow upwards. */
-#define INNER_THAN >
-
-/* FIXME: will verify this later */
-struct layout
-{
-  void *next;
-  void *return_address;
-};
diff --git a/sysdeps/mach/hurd/i386/sigcontextinfo.h b/sysdeps/mach/hurd/i386/sigcontextinfo.h
index 9842ecc..836ecb2 100644
--- a/sysdeps/mach/hurd/i386/sigcontextinfo.h
+++ b/sysdeps/mach/hurd/i386/sigcontextinfo.h
@@ -16,9 +16,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT struct sigcontext
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(ctx)	((void *) (ctx).sc_eip)
-#define GET_FRAME(ctx)	((void *) (ctx).sc_ebp)
-#define GET_STACK(ctx)	((void *) (ctx).sc_uesp)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
index 23f66d0..a0a57f3 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
@@ -16,9 +16,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT int _code, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _code,
 #define GET_PC(ctx)	((void *) (ctx)->sc_pc)
-#define GET_FRAME(ctx)	((void *) (ctx)->sc_regs[15])
-#define GET_STACK(ctx)	((void *) (ctx)->sc_regs[30])
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index daf9bd3..b8e79c2 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -19,21 +19,12 @@ 
 #include <sys/ucontext.h>
 
 #define SIGCONTEXT siginfo_t *_si, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _si,
 
 /* The sigcontext structure changed between 2.0 and 2.1 kernels.  On any
    modern system we should be able to assume that the "new" format will be
    in use.  */
 
 #define GET_PC(ctx)	((void *) (ctx)->uc_mcontext.arm_pc)
-#define GET_FRAME(ctx)	ADVANCE_STACK_FRAME ((void *) ctx->uc_mcontext.arm_fp)
-#define GET_STACK(ctx)	((void *) (ctx)->uc_mcontext.arm_sp)
-
-#define ADVANCE_STACK_FRAME(frm)	\
-			((struct layout *)frm - 1)
-
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 
 /* There is no reliable way to get the sigcontext unless we use a
    three-argument signal handler.  */
diff --git a/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h b/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
index a4ed29a..5dee976 100644
--- a/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h
@@ -17,34 +17,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT struct sigcontext
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(ctx)	((void *) ctx.eip)
-#define GET_FRAME(ctx)	((void *) ctx.ebp)
-#define GET_STACK(ctx)	((void *) ctx.esp_at_signal)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-do {									      \
-  int __tmp1, __tmp2, __tmp3, __tmp4;					      \
-  __asm __volatile ("movl\t%%esp, %%edi\n\t"				      \
-		    "andl\t$-16, %%esp\n\t"				      \
-		    "subl\t%8, %%esp\n\t"				      \
-		    "movl\t%%edi, %c8-4(%%esp)\n\t"			      \
-		    "movl\t%1, 0(%%esp)\n\t"				      \
-		    "leal\t4(%%esp), %%edi\n\t"				      \
-		    "cld\n\t"						      \
-		    "rep\tmovsl\n\t"					      \
-		    "call\t*%0\n\t"					      \
-		    "cld\n\t"						      \
-		    "movl\t%9, %%ecx\n\t"				      \
-		    "subl\t%%edi, %%esi\n\t"				      \
-		    "leal\t4(%%esp,%%esi,1), %%edi\n\t"			      \
-		    "leal\t4(%%esp), %%esi\n\t"				      \
-		    "rep\tmovsl\n\t"					      \
-		    "movl\t%c8-4(%%esp), %%esp\n\t"			      \
-		    : "=a" (__tmp1), "=d" (__tmp2), "=S" (__tmp3),	      \
-		      "=c" (__tmp4)					      \
-		    : "0" (handler), "1" (signo), "2" (&ctx),		      \
-		      "3" (sizeof (struct sigcontext) / 4),		      \
-		      "n" ((sizeof (struct sigcontext) + 19) & ~15),	      \
-		      "i" (sizeof (struct sigcontext) / 4)		      \
-		    : "cc", "edi");					      \
-} while (0)
diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
index 214292d..4163aa3 100644
--- a/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h
@@ -16,10 +16,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT siginfo_t *_si, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _si,
 #define GET_PC(ctx)	((ctx)->sc_ip)
-#define GET_FRAME(ctx)	((void *) 0)
-#define GET_STACK(ctx)	((void *) 0)
-
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
index 58374ed..98e28be 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
@@ -17,9 +17,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT int _code, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _code,
 #define GET_PC(ctx)	((void *) (ctx)->sc_pc)
-#define GET_FRAME(ctx)	((void *) __builtin_frame_address (1))
-#define GET_STACK(ctx)	((void *) (ctx)->sc_usp)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h b/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
index 64d8f2f..c99d0d7 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h
@@ -17,9 +17,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT int _code, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _code,
 #define GET_PC(ctx)    ((void *) (ctx)->uc_mcontext.regs.pc)
-#define GET_FRAME(ctx) ((void *) (ctx)->uc_mcontext.regs.sp)
-#define GET_STACK(ctx) ((void *) (ctx)->uc_mcontext.regs.sp)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index d183a33..fb6e71b 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -22,21 +22,11 @@ 
 #if _MIPS_SIM == _ABIO32
 
 #define SIGCONTEXT unsigned long _code, struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS _code,
 #define GET_PC(ctx)	((void *) (unsigned long) ctx->sc_pc)
-#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->sc_regs[30])
-#define GET_STACK(ctx)	((void *) (unsigned long) ctx->sc_regs[29])
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 
 #else
 
 #define SIGCONTEXT unsigned long _code, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _code,
 #define GET_PC(ctx)	((void *) (unsigned long) ctx->uc_mcontext.pc)
-#define GET_FRAME(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[30])
-#define GET_STACK(ctx)	((void *) (unsigned long) ctx->uc_mcontext.gregs[29])
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 
 #endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
index 72381e3..0b682c7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h
@@ -18,9 +18,4 @@ 
 #include <signal.h>
 
 #define SIGCONTEXT struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(ctx)	((void *)((ctx)->regs->nip))
-#define GET_FRAME(ctx)	(*(void **)((ctx)->regs->gpr[1]))
-#define GET_STACK(ctx)	((void *)((ctx)->regs->gpr[1]))
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h b/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
index 3ca8a80..1476953 100644
--- a/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h
@@ -19,10 +19,4 @@ 
 #include <sys/ucontext.h>
 
 #define SIGCONTEXT siginfo_t *_si, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _si,
 #define GET_PC(ctx)	((void *) ctx->uc_mcontext.__gregs[REG_PC])
-#define GET_FRAME(ctx)	((void *) ctx->uc_mcontext.__gregs[REG_S0])
-#define GET_STACK(ctx)	((void *) ctx->uc_mcontext.__gregs[REG_SP])
-
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h b/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
index 2533e63..0826e58 100644
--- a/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h
@@ -19,9 +19,4 @@ 
 #include <signal.h>
 
 #define SIGCONTEXT struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(ctx)	((void *)((ctx)->sregs->regs.psw.addr))
-#define GET_FRAME(ctx)	(*(void **)((ctx)->sregs->regs.gprs[11]))
-#define GET_STACK(ctx)	((void *)((ctx)->sregs->regs.gprs[15]))
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h b/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
index d6dd48d..3f33b7f 100644
--- a/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h
@@ -18,9 +18,4 @@ 
 
 #define SIGCONTEXT int _a2, int _a3, int _a4, struct sigcontext
 
-#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
 #define GET_PC(ctx)	((void *) ctx.sc_pc)
-#define GET_FRAME(ctx)	((void *) ctx.sc_regs[14])
-#define GET_STACK(ctx)	((void *) ctx.sc_regs[15])
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
index 91233b8..1c32abf 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h
@@ -17,15 +17,4 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 #define SIGCONTEXT struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(__ctx)	((void *) ((__ctx)->si_regs.pc))
-#define FIRST_FRAME_POINTER \
-  ({ void *ret;							\
-     asm volatile ("ta 3; add %%fp, 56, %0" : "=r" (ret)); ret; })
-#define ADVANCE_STACK_FRAME(__next) \
-	((void *) (((unsigned *)(__next))+14))
-
-#define GET_STACK(__ctx)	((void *) (__ctx)->si_regs.u_regs[14])
-#define GET_FRAME(__ctx)	ADVANCE_STACK_FRAME (GET_STACK(__ctx))
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
index c9d2685..32066eb 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
@@ -20,12 +20,4 @@ 
 #define STACK_BIAS 2047
 #endif
 #define SIGCONTEXT struct sigcontext *
-#define SIGCONTEXT_EXTRA_ARGS
 #define GET_PC(__ctx)	((void *) ((__ctx)->sigc_regs.tpc))
-#define ADVANCE_STACK_FRAME(__next) \
-	((void *) (((unsigned long *) (((unsigned long int) (__next))     \
-					   + STACK_BIAS))+14))
-#define GET_STACK(__ctx)	((void *) ((__ctx)->sigc_regs.u_regs[14]))
-#define GET_FRAME(__ctx)	ADVANCE_STACK_FRAME (GET_STACK (__ctx))
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
index 82bc0c7..b23b846 100644
--- a/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/tile/sigcontextinfo.h
@@ -19,9 +19,4 @@ 
 #include <arch/abi.h>
 
 #define SIGCONTEXT siginfo_t *_si, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _si,
 #define GET_PC(ctx)	((void *) (long) ctx->uc_mcontext.pc)
-#define GET_FRAME(ctx)	((void *) (long) ctx->uc_mcontext.regs[TREG_FP])
-#define GET_STACK(ctx)	((void *) (long) ctx->uc_mcontext.sp)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h b/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
index 41ace60..165d6b0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h
@@ -18,13 +18,5 @@ 
 #include <stdint.h>
 
 #define SIGCONTEXT siginfo_t *_si, ucontext_t *
-#define SIGCONTEXT_EXTRA_ARGS _si,
 #define GET_PC(ctx)	\
   ((void *) (uintptr_t) (ctx)->uc_mcontext.gregs[REG_RIP])
-#define GET_FRAME(ctx)	\
-  ((void *) (uintptr_t) (ctx)->uc_mcontext.gregs[REG_RBP])
-#define GET_STACK(ctx)	\
-  ((void *) (uintptr_t) (ctx)->uc_mcontext.gregs[REG_RSP])
-
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))