Use printsignal instead of signame

As the former respects xlat styles while the latter doesn't.

* clone.c (SYS_FUNC(clone)): Use printsignal for printing termination
signal in printflags.
* fcntl.c (print_fcntl) <case F_SETSIG>: Use printsignal.
* prctl.c (SYS_FUNC(prctl)) <case PR_GET_PDEATHSIG,
case PR_SET_PDEATHSIG>: Likewise.
* print_sigevent.c (print_sigevent): Likewise.
* s390.c (s390_runtime_instr): Likewise.
* signal.c (SYS_FUNC(kill), SYS_FUNC(tgkill)): Likewise.
This commit is contained in:
Eugene Syromyatnikov 2018-10-07 05:12:42 +02:00 committed by Dmitry V. Levin
parent 8c3b410bac
commit b3f92b39f1
6 changed files with 17 additions and 14 deletions

View File

@ -91,8 +91,10 @@ SYS_FUNC(clone)
tprints("flags=");
if (!printflags64(clone_flags, flags & ~CSIGNAL, NULL))
sep = "";
if ((flags & CSIGNAL) != 0)
tprintf("%s%s", sep, signame(flags & CSIGNAL));
if ((flags & CSIGNAL) != 0) {
tprints(sep);
printsignal(flags & CSIGNAL);
}
if ((flags & (CLONE_PARENT_SETTID|CLONE_CHILD_SETTID
|CLONE_CHILD_CLEARTID|CLONE_SETTLS)) == 0)
return 0;

View File

@ -114,7 +114,7 @@ print_fcntl(struct tcb *tcp)
break;
case F_SETSIG:
tprints(", ");
tprints(signame(tcp->u_arg[2]));
printsignal(tcp->u_arg[2]);
break;
case F_GETOWN:
case F_GETPIPE_SZ:

View File

@ -141,7 +141,7 @@ SYS_FUNC(prctl)
tprints(", ");
} else if (!umove_or_printaddr(tcp, arg2, &i)) {
tprints("[");
tprints(signame(i));
printsignal(i);
tprints("]");
}
break;
@ -318,7 +318,7 @@ SYS_FUNC(prctl)
if (arg2 > 128)
tprintf("%" PRI_klu, arg2);
else
tprints(signame(arg2));
printsignal(arg2);
return RVAL_DECODED;
case PR_SET_PTRACER:

View File

@ -36,7 +36,7 @@ MPERS_PRINTER_DECL(void, print_sigevent,
case SIGEV_SIGNAL:
case SIGEV_THREAD:
case SIGEV_THREAD_ID:
tprints(signame(sev.sigev_signo));
printsignal(sev.sigev_signo);
break;
default:
tprintf("%u", sev.sigev_signo);

2
s390.c
View File

@ -1197,7 +1197,7 @@ SYS_FUNC(s390_runtime_instr)
switch (command) {
case S390_RUNTIME_INSTR_START:
tprints(", ");
tprints(signame(signum));
printsignal(signum);
break;
case S390_RUNTIME_INSTR_STOP:

View File

@ -442,19 +442,20 @@ SYS_FUNC(sigprocmask)
SYS_FUNC(kill)
{
tprintf("%d, %s",
(int) tcp->u_arg[0],
signame(tcp->u_arg[1]));
/* pid */
tprintf("%d, ", (int) tcp->u_arg[0]);
/* signal */
printsignal(tcp->u_arg[1]);
return RVAL_DECODED;
}
SYS_FUNC(tgkill)
{
tprintf("%d, %d, %s",
(int) tcp->u_arg[0],
(int) tcp->u_arg[1],
signame(tcp->u_arg[2]));
/* tgid, tid */
tprintf("%d, %d, ", (int) tcp->u_arg[0], (int) tcp->u_arg[1]);
/* signal */
printsignal(tcp->u_arg[2]);
return RVAL_DECODED;
}