glibc/sysdeps/mach/hurd/i386/sigcontextinfo.h

28 lines
964 B
C
Raw Normal View History

/* Copyright (C) 1998-2020 Free Software Foundation, Inc.
Update. 1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com> * shlib-versions: Remove definition for libSegFault. * memory.texi: Comment out the relocating allocator description. * manual/signal.texi: Remove reference to relocating allocator. * manual/top-menu.texi: Regenerated. * posix/fnmatch.c: Implement [: :] and change to recognize ^ as negation only when not _POSIXLY_CORRECT. * sysdeps/generic/glob.c: Add several optimizations. * posix/glob.h: Undefine __PMT to prevent warnings. Reported by Roland McGrath. * posix/regex.c: Define namespace macros only for _LIBC. * sysdeps/arm/dl-machine.h: Fix typo. * sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack, sigpending, sigqueue, and sigtimedwait. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file. * timezone/leapseconds: Update from tzdata1998f. 1998-07-18 Mark Kettenis <kettenis@phys.uva.nl> * stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked. * stdio/Versions [GLIBC_2.1]: Add fputs_unlocked. * libio/stdio.h: Fix typo. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the magic memobj port arg parsing stuff. Fix it someday when we are ready to really use it. (_dl_sysdep_output): New function, modified from _dl_sysdep_error. (_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * stdio/fputs.c: Add fputs_unlocked as weak alias for fputs. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as a weak alias. * sysdeps/mach/hurd/sigsuspend.c: Likewise. * sysdeps/generic/sigsuspend.c: Likewise. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/i386/sigcontextinfo.h: New file. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (map-file): Don't use $(wildcard) to find the generated version script, instead look in $(version-maps). ($(common-objpfx)libc.so): Only depend on libc.map if versioning is used. * extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script if versioning is used. Don't use $(wildcard) to find the generated version script, instead look in $(verson-maps). 1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove unused function handle. * sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * debug/catchsegv.sh: Fix argument processing, quoting and various typos. Put the crash info always in the current directory. Find program in $PATH if it contains no directory component. * Makerules (install-lib.so-versioned, install-lib.so-unversioned): New variables. (install-lib-nosubdir): Depend on unversioned libs in slibdir, not libdir. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Make-dist (+tsrcs): Remove references to %-map variables and *.map files. Add Versions in subdirs. * Makerules (distinfo-vars): Don't write out %-map variables. 1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com> * inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR. Include <paths.h> instead. * sysdeps/generic/paths.h: Define _PATH_RWHODIR. * sysdeps/unix/sysv/linux/paths.h: Likewise. Reported by Dale Scheetz <dwarf@polaris.net>. 1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com> * catgets/open_catalog.c: Strictly check whether catalog file is larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 19:25:48 +02:00
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.
Update. 1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com> * shlib-versions: Remove definition for libSegFault. * memory.texi: Comment out the relocating allocator description. * manual/signal.texi: Remove reference to relocating allocator. * manual/top-menu.texi: Regenerated. * posix/fnmatch.c: Implement [: :] and change to recognize ^ as negation only when not _POSIXLY_CORRECT. * sysdeps/generic/glob.c: Add several optimizations. * posix/glob.h: Undefine __PMT to prevent warnings. Reported by Roland McGrath. * posix/regex.c: Define namespace macros only for _LIBC. * sysdeps/arm/dl-machine.h: Fix typo. * sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack, sigpending, sigqueue, and sigtimedwait. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file. * timezone/leapseconds: Update from tzdata1998f. 1998-07-18 Mark Kettenis <kettenis@phys.uva.nl> * stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked. * stdio/Versions [GLIBC_2.1]: Add fputs_unlocked. * libio/stdio.h: Fix typo. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the magic memobj port arg parsing stuff. Fix it someday when we are ready to really use it. (_dl_sysdep_output): New function, modified from _dl_sysdep_error. (_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * stdio/fputs.c: Add fputs_unlocked as weak alias for fputs. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as a weak alias. * sysdeps/mach/hurd/sigsuspend.c: Likewise. * sysdeps/generic/sigsuspend.c: Likewise. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/i386/sigcontextinfo.h: New file. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (map-file): Don't use $(wildcard) to find the generated version script, instead look in $(version-maps). ($(common-objpfx)libc.so): Only depend on libc.map if versioning is used. * extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script if versioning is used. Don't use $(wildcard) to find the generated version script, instead look in $(verson-maps). 1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove unused function handle. * sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * debug/catchsegv.sh: Fix argument processing, quoting and various typos. Put the crash info always in the current directory. Find program in $PATH if it contains no directory component. * Makerules (install-lib.so-versioned, install-lib.so-unversioned): New variables. (install-lib-nosubdir): Depend on unversioned libs in slibdir, not libdir. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Make-dist (+tsrcs): Remove references to %-map variables and *.map files. Add Versions in subdirs. * Makerules (distinfo-vars): Don't write out %-map variables. 1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com> * inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR. Include <paths.h> instead. * sysdeps/generic/paths.h: Define _PATH_RWHODIR. * sysdeps/unix/sysv/linux/paths.h: Likewise. Reported by Dale Scheetz <dwarf@polaris.net>. 1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com> * catgets/open_catalog.c: Strictly check whether catalog file is larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 19:25:48 +02:00
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.
Update. 1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com> * shlib-versions: Remove definition for libSegFault. * memory.texi: Comment out the relocating allocator description. * manual/signal.texi: Remove reference to relocating allocator. * manual/top-menu.texi: Regenerated. * posix/fnmatch.c: Implement [: :] and change to recognize ^ as negation only when not _POSIXLY_CORRECT. * sysdeps/generic/glob.c: Add several optimizations. * posix/glob.h: Undefine __PMT to prevent warnings. Reported by Roland McGrath. * posix/regex.c: Define namespace macros only for _LIBC. * sysdeps/arm/dl-machine.h: Fix typo. * sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack, sigpending, sigqueue, and sigtimedwait. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file. * timezone/leapseconds: Update from tzdata1998f. 1998-07-18 Mark Kettenis <kettenis@phys.uva.nl> * stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked. * stdio/Versions [GLIBC_2.1]: Add fputs_unlocked. * libio/stdio.h: Fix typo. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the magic memobj port arg parsing stuff. Fix it someday when we are ready to really use it. (_dl_sysdep_output): New function, modified from _dl_sysdep_error. (_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * stdio/fputs.c: Add fputs_unlocked as weak alias for fputs. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as a weak alias. * sysdeps/mach/hurd/sigsuspend.c: Likewise. * sysdeps/generic/sigsuspend.c: Likewise. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/i386/sigcontextinfo.h: New file. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (map-file): Don't use $(wildcard) to find the generated version script, instead look in $(version-maps). ($(common-objpfx)libc.so): Only depend on libc.map if versioning is used. * extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script if versioning is used. Don't use $(wildcard) to find the generated version script, instead look in $(verson-maps). 1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove unused function handle. * sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * debug/catchsegv.sh: Fix argument processing, quoting and various typos. Put the crash info always in the current directory. Find program in $PATH if it contains no directory component. * Makerules (install-lib.so-versioned, install-lib.so-unversioned): New variables. (install-lib-nosubdir): Depend on unversioned libs in slibdir, not libdir. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Make-dist (+tsrcs): Remove references to %-map variables and *.map files. Add Versions in subdirs. * Makerules (distinfo-vars): Don't write out %-map variables. 1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com> * inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR. Include <paths.h> instead. * sysdeps/generic/paths.h: Define _PATH_RWHODIR. * sysdeps/unix/sysv/linux/paths.h: Likewise. Reported by Dale Scheetz <dwarf@polaris.net>. 1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com> * catgets/open_catalog.c: Strictly check whether catalog file is larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 19:25:48 +02:00
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
Prefer https to http for gnu.org and fsf.org URLs Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 07:40:42 +02:00
<https://www.gnu.org/licenses/>. */
Update. 1998-07-20 17:09 Ulrich Drepper <drepper@cygnus.com> * shlib-versions: Remove definition for libSegFault. * memory.texi: Comment out the relocating allocator description. * manual/signal.texi: Remove reference to relocating allocator. * manual/top-menu.texi: Regenerated. * posix/fnmatch.c: Implement [: :] and change to recognize ^ as negation only when not _POSIXLY_CORRECT. * sysdeps/generic/glob.c: Add several optimizations. * posix/glob.h: Undefine __PMT to prevent warnings. Reported by Roland McGrath. * posix/regex.c: Define namespace macros only for _LIBC. * sysdeps/arm/dl-machine.h: Fix typo. * sysdeps/unix/sysv/sysv4/solaris2/sigpending.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigstack.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c: New file. * sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: Add sigaltstack, sigpending, sigqueue, and sigtimedwait. * sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S: New file. * timezone/leapseconds: Update from tzdata1998f. 1998-07-18 Mark Kettenis <kettenis@phys.uva.nl> * stdio/stdio.h [__USE_GNU]: Add prototype for fputs_unlocked. * stdio/Versions [GLIBC_2.1]: Add fputs_unlocked. * libio/stdio.h: Fix typo. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): #if 0 out the magic memobj port arg parsing stuff. Fix it someday when we are ready to really use it. (_dl_sysdep_output): New function, modified from _dl_sysdep_error. (_dl_sysdep_error, _dl_sysdep_message, _dl_sysdep_fatal): Removed. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * stdio/fputs.c: Add fputs_unlocked as weak alias for fputs. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/posix/sigsuspend.c: Define __sigsuspend with sigsuspend as a weak alias. * sysdeps/mach/hurd/sigsuspend.c: Likewise. * sysdeps/generic/sigsuspend.c: Likewise. 1998-07-19 Roland McGrath <roland@baalperazim.frob.com> * sysdeps/mach/hurd/i386/sigcontextinfo.h: New file. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (map-file): Don't use $(wildcard) to find the generated version script, instead look in $(version-maps). ($(common-objpfx)libc.so): Only depend on libc.map if versioning is used. * extra-lib.mk ($(objpfx)$(lib).so): Only depend on version script if versioning is used. Don't use $(wildcard) to find the generated version script, instead look in $(verson-maps). 1998-07-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/segfault.c: Rename GET_EIP to GET_PC. Remove unused function handle. * sysdeps/generic/sigcontextinfo.h: Rename GET_EIP to GET_PC. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * debug/catchsegv.sh: Fix argument processing, quoting and various typos. Put the crash info always in the current directory. Find program in $PATH if it contains no directory component. * Makerules (install-lib.so-versioned, install-lib.so-unversioned): New variables. (install-lib-nosubdir): Depend on unversioned libs in slibdir, not libdir. 1998-07-19 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Make-dist (+tsrcs): Remove references to %-map variables and *.map files. Add Versions in subdirs. * Makerules (distinfo-vars): Don't write out %-map variables. 1998-07-20 13:55 Ulrich Drepper <drepper@cygnus.com> * inet/protocols/rwhod.h: Remove definition of _PATH_RWHODIR. Include <paths.h> instead. * sysdeps/generic/paths.h: Define _PATH_RWHODIR. * sysdeps/unix/sysv/linux/paths.h: Likewise. Reported by Dale Scheetz <dwarf@polaris.net>. 1998-07-17 21:44 Ulrich Drepper <drepper@cygnus.com> * catgets/open_catalog.c: Strictly check whether catalog file is larger enough for the data. Reported by Andries.Brouwer@cwi.nl.
1998-07-20 19:25:48 +02:00
Refactor sigcontextinfo.h This patch refactor sigcontextinfo.h header to use SA_SIGINFO as default for both gmon and debug implementations. This allows simplify profil-counter.h on Linux to use a single implementation and remove the requirements for newer ports to redefine __sigaction/sigaction to use SA_SIGINFO. The GET_PC macro is also replaced with a function sigcontext_get_pc that returns an uintptr_t instead of a void pointer. It allows easier convertion to integer on ILP32 architecture, such as x32, without the need to suppress compiler warnings. The patch also requires some refactor of register-dump.h file for some architectures (to reflect it is now called from a sa_sigaction instead of sa_handler signal context). - Alpha, i386, and s390 are straighfoward to take in consideration the new argument type. - ia64 takes in consideration the kernel pass a struct sigcontextt as third argument for sa_sigaction. - sparc take in consideration the kernel pass a pt_regs struct as third argument for sa_sigaction. - m68k dummy function is removed and the FP state is dumped on register_dump itself. - For SH the register-dump.h file is consolidate on a common implementation and the floating-point state is checked based on ownedfp field. The register_dump does not change its output format in any affected architecture. I checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu, and powerpc64le-linux-gnu. I also checked the libSegFault.so through catchsegv on alpha-linux-gnu, m68k-linux-gnu and sh4-linux-gnu to confirm the output has not changed. Adhemerval Zanella <adhemerval.zanella@linaro.org> Florian Weimer <fweimer@redhat.com> * debug/segfault.c (install_handler): Use SA_SIGINFO if defined. * sysdeps/generic/profil-counter.h (__profil_counter): Cast to uintptr_t. * sysdeps/generic/sigcontextinfo.h (GET_PC): Rename to sigcontext_get_pc and return aligned cast to uintptr_t. * sysdeps/mach/hurd/i386/sigcontextinfo.h (GET_PC): Likewise. * sysdeps/posix/profil.c (profil_count): Change PC argument to uintptr_t. (__profil): Use SA_SIGINFO. * sysdeps/posix/sprofil.c (profil_count): Change PCP argument to uintptr_t. (__sprofil): Use SA_SIGINFO. * sysdeps/unix/sysv/linux/profil-counter.h: New file. * sysdeps/unix/sysv/linux/aarch64/profil-counter.h: Remove file. * sysdeps/unix/sysv/linux/csky/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/hppa/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/mips/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/nios2/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/riscv/profil-counter.h: Likewise. * sysdeps/sysv/linux/s390/s390-32/profil-counter.h: Likewise. * sysdeps/sysv/linux/s390/s390-64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/sh/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h (__profil_counter): Assume SA_SIGINFO and use sigcontext_get_pc instead of GET_PC. * sysdeps/unix/sysv/linux/sparc/profil-counter.h: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h: Likewise. * sysdpes/unix/sysv/linux/aarch64/sigcontextinfo.h (SIGCONTEXT, GET_PC, __sigaction, sigaction): Remove defines. (sigcontext_get_pc): New function. * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/csky/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/s390/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: Likewise. * sysdeps/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise. * sysdeps/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/alpha/register-dump.h (register_dump): Handle CTX argument as ucontext_t. * sysdeps/unix/sysv/linux/i386/register-dump.h: Likewise. Likewise. * sysdeps/unix/sysv/linux/m68k/register-dump.h: Likewise. * sysdeps/sysv/linux/s390/s390-32/register-dump.h: Likewise. * sysdeps/sysv/linux/s390/s390-64/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sh/register-dump.h: New file. * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Remove File. * sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/Makefile (tests-internal): Add tst-sigcontextinfo-get_pc. * sysdeps/unix/sysv/linux/tst-sigcontextinfo-get_pc.c: New file. (CFLAGS-tst-sigcontextinfo-get_pc.c): New rule.
2018-12-17 19:44:14 +01:00
#ifndef _SIGCONTEXTINFO_H
#define _SIGCONTEXTINFO_H
static inline uintptr_t
sigcontext_get_pc (struct ucontext_t *ctx)
Refactor sigcontextinfo.h This patch refactor sigcontextinfo.h header to use SA_SIGINFO as default for both gmon and debug implementations. This allows simplify profil-counter.h on Linux to use a single implementation and remove the requirements for newer ports to redefine __sigaction/sigaction to use SA_SIGINFO. The GET_PC macro is also replaced with a function sigcontext_get_pc that returns an uintptr_t instead of a void pointer. It allows easier convertion to integer on ILP32 architecture, such as x32, without the need to suppress compiler warnings. The patch also requires some refactor of register-dump.h file for some architectures (to reflect it is now called from a sa_sigaction instead of sa_handler signal context). - Alpha, i386, and s390 are straighfoward to take in consideration the new argument type. - ia64 takes in consideration the kernel pass a struct sigcontextt as third argument for sa_sigaction. - sparc take in consideration the kernel pass a pt_regs struct as third argument for sa_sigaction. - m68k dummy function is removed and the FP state is dumped on register_dump itself. - For SH the register-dump.h file is consolidate on a common implementation and the floating-point state is checked based on ownedfp field. The register_dump does not change its output format in any affected architecture. I checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu, and powerpc64le-linux-gnu. I also checked the libSegFault.so through catchsegv on alpha-linux-gnu, m68k-linux-gnu and sh4-linux-gnu to confirm the output has not changed. Adhemerval Zanella <adhemerval.zanella@linaro.org> Florian Weimer <fweimer@redhat.com> * debug/segfault.c (install_handler): Use SA_SIGINFO if defined. * sysdeps/generic/profil-counter.h (__profil_counter): Cast to uintptr_t. * sysdeps/generic/sigcontextinfo.h (GET_PC): Rename to sigcontext_get_pc and return aligned cast to uintptr_t. * sysdeps/mach/hurd/i386/sigcontextinfo.h (GET_PC): Likewise. * sysdeps/posix/profil.c (profil_count): Change PC argument to uintptr_t. (__profil): Use SA_SIGINFO. * sysdeps/posix/sprofil.c (profil_count): Change PCP argument to uintptr_t. (__sprofil): Use SA_SIGINFO. * sysdeps/unix/sysv/linux/profil-counter.h: New file. * sysdeps/unix/sysv/linux/aarch64/profil-counter.h: Remove file. * sysdeps/unix/sysv/linux/csky/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/hppa/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/mips/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/nios2/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/riscv/profil-counter.h: Likewise. * sysdeps/sysv/linux/s390/s390-32/profil-counter.h: Likewise. * sysdeps/sysv/linux/s390/s390-64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/sh/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h (__profil_counter): Assume SA_SIGINFO and use sigcontext_get_pc instead of GET_PC. * sysdeps/unix/sysv/linux/sparc/profil-counter.h: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h: Likewise. * sysdpes/unix/sysv/linux/aarch64/sigcontextinfo.h (SIGCONTEXT, GET_PC, __sigaction, sigaction): Remove defines. (sigcontext_get_pc): New function. * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/csky/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/s390/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: Likewise. * sysdeps/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise. * sysdeps/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/alpha/register-dump.h (register_dump): Handle CTX argument as ucontext_t. * sysdeps/unix/sysv/linux/i386/register-dump.h: Likewise. Likewise. * sysdeps/unix/sysv/linux/m68k/register-dump.h: Likewise. * sysdeps/sysv/linux/s390/s390-32/register-dump.h: Likewise. * sysdeps/sysv/linux/s390/s390-64/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sh/register-dump.h: New file. * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Remove File. * sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/Makefile (tests-internal): Add tst-sigcontextinfo-get_pc. * sysdeps/unix/sysv/linux/tst-sigcontextinfo-get_pc.c: New file. (CFLAGS-tst-sigcontextinfo-get_pc.c): New rule.
2018-12-17 19:44:14 +01:00
{
return ctx->uc_mcontext.gregs[REG_EIP];
Refactor sigcontextinfo.h This patch refactor sigcontextinfo.h header to use SA_SIGINFO as default for both gmon and debug implementations. This allows simplify profil-counter.h on Linux to use a single implementation and remove the requirements for newer ports to redefine __sigaction/sigaction to use SA_SIGINFO. The GET_PC macro is also replaced with a function sigcontext_get_pc that returns an uintptr_t instead of a void pointer. It allows easier convertion to integer on ILP32 architecture, such as x32, without the need to suppress compiler warnings. The patch also requires some refactor of register-dump.h file for some architectures (to reflect it is now called from a sa_sigaction instead of sa_handler signal context). - Alpha, i386, and s390 are straighfoward to take in consideration the new argument type. - ia64 takes in consideration the kernel pass a struct sigcontextt as third argument for sa_sigaction. - sparc take in consideration the kernel pass a pt_regs struct as third argument for sa_sigaction. - m68k dummy function is removed and the FP state is dumped on register_dump itself. - For SH the register-dump.h file is consolidate on a common implementation and the floating-point state is checked based on ownedfp field. The register_dump does not change its output format in any affected architecture. I checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu, and powerpc64le-linux-gnu. I also checked the libSegFault.so through catchsegv on alpha-linux-gnu, m68k-linux-gnu and sh4-linux-gnu to confirm the output has not changed. Adhemerval Zanella <adhemerval.zanella@linaro.org> Florian Weimer <fweimer@redhat.com> * debug/segfault.c (install_handler): Use SA_SIGINFO if defined. * sysdeps/generic/profil-counter.h (__profil_counter): Cast to uintptr_t. * sysdeps/generic/sigcontextinfo.h (GET_PC): Rename to sigcontext_get_pc and return aligned cast to uintptr_t. * sysdeps/mach/hurd/i386/sigcontextinfo.h (GET_PC): Likewise. * sysdeps/posix/profil.c (profil_count): Change PC argument to uintptr_t. (__profil): Use SA_SIGINFO. * sysdeps/posix/sprofil.c (profil_count): Change PCP argument to uintptr_t. (__sprofil): Use SA_SIGINFO. * sysdeps/unix/sysv/linux/profil-counter.h: New file. * sysdeps/unix/sysv/linux/aarch64/profil-counter.h: Remove file. * sysdeps/unix/sysv/linux/csky/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/hppa/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/i386/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/ia64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/mips/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/nios2/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/riscv/profil-counter.h: Likewise. * sysdeps/sysv/linux/s390/s390-32/profil-counter.h: Likewise. * sysdeps/sysv/linux/s390/s390-64/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/sh/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/arm/profil-counter.h (__profil_counter): Assume SA_SIGINFO and use sigcontext_get_pc instead of GET_PC. * sysdeps/unix/sysv/linux/sparc/profil-counter.h: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/profil-counter.h: Remove file. * sysdeps/unix/sysv/linux/sparc/sparc32/profil-counter.h: Likewise. * sysdpes/unix/sysv/linux/aarch64/sigcontextinfo.h (SIGCONTEXT, GET_PC, __sigaction, sigaction): Remove defines. (sigcontext_get_pc): New function. * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/csky/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/s390/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: Likewise. * sysdeps/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise. * sysdeps/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/alpha/register-dump.h (register_dump): Handle CTX argument as ucontext_t. * sysdeps/unix/sysv/linux/i386/register-dump.h: Likewise. Likewise. * sysdeps/unix/sysv/linux/m68k/register-dump.h: Likewise. * sysdeps/sysv/linux/s390/s390-32/register-dump.h: Likewise. * sysdeps/sysv/linux/s390/s390-64/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sh/register-dump.h: New file. * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h: Remove File. * sysdeps/unix/sysv/linux/sh/sh3/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/Makefile (tests-internal): Add tst-sigcontextinfo-get_pc. * sysdeps/unix/sysv/linux/tst-sigcontextinfo-get_pc.c: New file. (CFLAGS-tst-sigcontextinfo-get_pc.c): New rule.
2018-12-17 19:44:14 +01:00
}
#endif