ptrace: decode addr argument of PTRACE_PEEKSIGINFO request
The addr argument of PTRACE_PEEKSIGINFO request is a pointer to a struct ptrace_peeksiginfo_args. * process.c: Include "xlat/ptrace_peeksiginfo_flags.h". (SYS_FUNC(ptrace)): Print addr argument of PTRACE_PEEKSIGINFO request as a struct ptrace_peeksiginfo_args. * xlat/ptrace_peeksiginfo_flags.in: New file.
This commit is contained in:
parent
3a5cd34e34
commit
809ee3e46c
19
process.c
19
process.c
@ -46,6 +46,7 @@
|
||||
#include "ptrace.h"
|
||||
#include "xlat/ptrace_cmds.h"
|
||||
#include "xlat/ptrace_setoptions_flags.h"
|
||||
#include "xlat/ptrace_peeksiginfo_flags.h"
|
||||
|
||||
#define uoff(member) offsetof(struct user, member)
|
||||
#define XLAT_UOFF(member) { uoff(member), "offsetof(struct user, " #member ")" }
|
||||
@ -122,6 +123,24 @@ SYS_FUNC(ptrace)
|
||||
case PTRACE_SECCOMP_GET_FILTER:
|
||||
tprintf(", %lu", addr);
|
||||
break;
|
||||
case PTRACE_PEEKSIGINFO: {
|
||||
tprints(", ");
|
||||
struct {
|
||||
uint64_t off;
|
||||
uint32_t flags;
|
||||
uint32_t nr;
|
||||
} psi;
|
||||
if (umove_or_printaddr(tcp, addr, &psi)) {
|
||||
tprints(", ");
|
||||
printaddr(data);
|
||||
return RVAL_DECODED;
|
||||
}
|
||||
tprintf("{off=%" PRIu64 ", flags=", psi.off);
|
||||
printflags(ptrace_peeksiginfo_flags, psi.flags,
|
||||
"PTRACE_PEEKSIGINFO_???");
|
||||
tprintf(", nr=%u}", psi.nr);
|
||||
break;
|
||||
}
|
||||
#if defined SPARC || defined SPARC64
|
||||
case PTRACE_GETREGS:
|
||||
case PTRACE_SETREGS:
|
||||
|
1
xlat/ptrace_peeksiginfo_flags.in
Normal file
1
xlat/ptrace_peeksiginfo_flags.in
Normal file
@ -0,0 +1 @@
|
||||
PTRACE_PEEKSIGINFO_SHARED 1
|
Loading…
x
Reference in New Issue
Block a user