From 7dcc854b5430fa594f042fa481ec915fde53f530 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 16 Feb 2019 00:33:38 +0000 Subject: [PATCH] hppa: enhance decoding of PTRACE_PEEKUSER and PTRACE_POKEUSER Print symbolic constants corresponding to numeric arguments of PTRACE_PEEKUSER and PTRACE_POKEUSER requests. * linux/hppa/userent.h: New file. * Makefile.am (EXTRA_DIST): Add it. * NEWS: Mention this. --- Makefile.am | 1 + NEWS | 1 + linux/hppa/userent.h | 69 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 linux/hppa/userent.h diff --git a/Makefile.am b/Makefile.am index 9350dc2e..c2b7ee10 100644 --- a/Makefile.am +++ b/Makefile.am @@ -529,6 +529,7 @@ EXTRA_DIST = \ linux/hppa/set_scno.c \ linux/hppa/signalent.h \ linux/hppa/syscallent.h \ + linux/hppa/userent.h \ linux/i386/arch_defs_.h \ linux/i386/arch_kvm.c \ linux/i386/arch_regs.c \ diff --git a/NEWS b/NEWS index d26701f5..ae1a94e4 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Noteworthy changes in release ?.?? (????-??-??) * Improvements * Enhanced xlat styles support configured by -X option. + * Enhanced decoding of PTRACE_PEEKUSER and PTRACE_POKEUSER on hppa. * Wired up kexec_file_load and rseq syscalls on aarch64, arc, metag, nios2, or1k, riscv, and tile architectures. * Updated lists of BPF_*, BTRFS_*, FAN_*, IFLA_*, KERN_*, KVM_CAP_*, NDA_*, diff --git a/linux/hppa/userent.h b/linux/hppa/userent.h new file mode 100644 index 00000000..454b95a4 --- /dev/null +++ b/linux/hppa/userent.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2019 The strace developers. + * All rights reserved. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#define XLAT_PT_REGS_OFF(member) \ + { offsetof(struct pt_regs, member), \ + "offsetof(struct pt_regs, " #member ")" } + +XLAT_PT_REGS_OFF(gr[0]), +XLAT_PT_REGS_OFF(gr[1]), +XLAT_PT_REGS_OFF(gr[2]), +XLAT_PT_REGS_OFF(gr[3]), +XLAT_PT_REGS_OFF(gr[4]), +XLAT_PT_REGS_OFF(gr[5]), +XLAT_PT_REGS_OFF(gr[6]), +XLAT_PT_REGS_OFF(gr[7]), +XLAT_PT_REGS_OFF(gr[8]), +XLAT_PT_REGS_OFF(gr[9]), +XLAT_PT_REGS_OFF(gr[10]), +XLAT_PT_REGS_OFF(gr[11]), +XLAT_PT_REGS_OFF(gr[12]), +XLAT_PT_REGS_OFF(gr[13]), +XLAT_PT_REGS_OFF(gr[14]), +XLAT_PT_REGS_OFF(gr[15]), +XLAT_PT_REGS_OFF(gr[16]), +XLAT_PT_REGS_OFF(gr[17]), +XLAT_PT_REGS_OFF(gr[18]), +XLAT_PT_REGS_OFF(gr[19]), +XLAT_PT_REGS_OFF(gr[20]), +XLAT_PT_REGS_OFF(gr[21]), +XLAT_PT_REGS_OFF(gr[22]), +XLAT_PT_REGS_OFF(gr[23]), +XLAT_PT_REGS_OFF(gr[24]), +XLAT_PT_REGS_OFF(gr[25]), +XLAT_PT_REGS_OFF(gr[26]), +XLAT_PT_REGS_OFF(gr[27]), +XLAT_PT_REGS_OFF(gr[28]), +XLAT_PT_REGS_OFF(gr[29]), +XLAT_PT_REGS_OFF(gr[30]), +XLAT_PT_REGS_OFF(gr[31]), + +XLAT_PT_REGS_OFF(sr[0]), +XLAT_PT_REGS_OFF(sr[1]), +XLAT_PT_REGS_OFF(sr[2]), +XLAT_PT_REGS_OFF(sr[3]), +XLAT_PT_REGS_OFF(sr[4]), +XLAT_PT_REGS_OFF(sr[5]), +XLAT_PT_REGS_OFF(sr[6]), + +XLAT_PT_REGS_OFF(iasq[0]), +XLAT_PT_REGS_OFF(iasq[1]), + +XLAT_PT_REGS_OFF(iaoq[0]), +XLAT_PT_REGS_OFF(iaoq[1]), + +XLAT_PT_REGS_OFF(cr27), +XLAT_PT_REGS_OFF(orig_r28), +XLAT_PT_REGS_OFF(ksp), +XLAT_PT_REGS_OFF(kpc), +XLAT_PT_REGS_OFF(sar), +XLAT_PT_REGS_OFF(iir), +XLAT_PT_REGS_OFF(isr), +XLAT_PT_REGS_OFF(ior), +XLAT_PT_REGS_OFF(ipsw), + +#undef XLAT_PT_REGS_OFF -- 2.40.0