summaryrefslogtreecommitdiff
path: root/s390.c
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2018-01-14 09:37:43 +0100
committerEugene Syromyatnikov <evgsyr@gmail.com>2018-01-29 14:10:10 +0100
commita0094a0ebd094d2a8576d0549189856826ebcabe (patch)
tree47a9ae289d601335a2fc13d56e49ff48c7dbac0b /s390.c
parent52970d343bc3cc42be8c34050b6427172b5b8c32 (diff)
downloadstrace-a0094a0ebd094d2a8576d0549189856826ebcabe.tar.gz
Introduce s390_runtime_instr system call decoder
* linux/s390/syscallent.h ([342]): Change decoder to s390_runtime_instr. * linux/s390x/syscallent.h: Likewise. * s390.c (SYS_FUNC(s390_runtime_instr)): New function. * xlat/s390_runtime_instr_commands.in: New file.
Diffstat (limited to 's390.c')
-rw-r--r--s390.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/s390.c b/s390.c
index 2358adb4a..c562382d8 100644
--- a/s390.c
+++ b/s390.c
@@ -36,6 +36,7 @@
#include "print_fields.h"
#include "xlat/s390_guarded_storage_commands.h"
+#include "xlat/s390_runtime_instr_commands.h"
#include "xlat/s390_sthyi_function_codes.h"
/*
@@ -1210,4 +1211,34 @@ SYS_FUNC(s390_guarded_storage)
return RVAL_DECODED;
}
+SYS_FUNC(s390_runtime_instr)
+{
+ int command = (int) tcp->u_arg[0];
+ int signum = (int) tcp->u_arg[1];
+
+ const char *command_descr =
+ xlookup(s390_runtime_instr_commands, command);
+
+ tprintf("%d", command);
+ tprints_comment(command_descr ? command_descr :
+ "S390_RUNTIME_INSTR_???");
+
+ /*
+ * signum is ignored since Linux 4.4, but let's print it for start
+ * command anyway.
+ */
+ switch (command) {
+ case S390_RUNTIME_INSTR_START:
+ tprints(", ");
+ tprints(signame(signum));
+ break;
+
+ case S390_RUNTIME_INSTR_STOP:
+ default:
+ break;
+ }
+
+ return RVAL_DECODED;
+}
+
#endif /* defined S390 || defined S390X */