]> granicus.if.org Git - strace/commit
syscall.c: refactor getregs_old fallback in get_regs
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 12 Nov 2016 10:59:57 +0000 (10:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 13 Nov 2016 11:16:15 +0000 (11:16 +0000)
commit695545a8b368a04b34987e60f86123db2db4927c
tree6937f37505373d3eae29b4e786ceae6ff7d48a30
parente061d67dffff7a9ea882560e7dc2bde910e353d7
syscall.c: refactor getregs_old fallback in get_regs

This change moves remaining arch specific getregs_old code into
appropriate arch subdirectories and removes unnecessary code
duplication.

* linux/getregs_old.h: New file.
* linux/powerpc/getregs_old.h: Likewise.
* linux/powerpc64/getregs_old.h: Likewise.
* linux/x86_64/getregs_old.h: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* syscall.c: Include "getregs_old.h".
[X86_64 || POWERPC]: Remove.
[ARCH_REGS_FOR_GETREGSET] (ptrace_getregset_or_getregs): Define
to ptrace_getregset.
[ARCH_REGS_FOR_GETREGS] (ptrace_getregset_or_getregs): Define
to ptrace_getregs.
(get_regs): Check for ptrace_getregset_or_getregs instead
of ARCH_REGS_FOR_GETREGSET and ARCH_REGS_FOR_GETREGS.  Use
ptrace_getregset_or_getregs instead of ptrace_getregset and
ptrace_getregs.  Check for HAVE_GETREGS_OLD instead of X86_64
and POWERPC.  Use use_getregs_old instead of getregset_support
and old_kernel.
Makefile.am
linux/getregs_old.h [new file with mode: 0644]
linux/powerpc/getregs_old.h [new file with mode: 0644]
linux/powerpc64/getregs_old.h [new file with mode: 0644]
linux/x86_64/getregs_old.h [new file with mode: 0644]
syscall.c