Browse Source

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.
Eugene Syromyatnikov 1 year ago
parent
commit
b3f92b39f1
6 changed files with 17 additions and 14 deletions
  1. 4
    2
      clone.c
  2. 1
    1
      fcntl.c
  3. 2
    2
      prctl.c
  4. 1
    1
      print_sigevent.c
  5. 1
    1
      s390.c
  6. 8
    7
      signal.c

+ 4
- 2
clone.c View File

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

+ 1
- 1
fcntl.c View File

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

+ 2
- 2
prctl.c View File

@@ -141,7 +141,7 @@ SYS_FUNC(prctl)
141 141
 			tprints(", ");
142 142
 		} else if (!umove_or_printaddr(tcp, arg2, &i)) {
143 143
 			tprints("[");
144
-			tprints(signame(i));
144
+			printsignal(i);
145 145
 			tprints("]");
146 146
 		}
147 147
 		break;
@@ -318,7 +318,7 @@ SYS_FUNC(prctl)
318 318
 		if (arg2 > 128)
319 319
 			tprintf("%" PRI_klu, arg2);
320 320
 		else
321
-			tprints(signame(arg2));
321
+			printsignal(arg2);
322 322
 		return RVAL_DECODED;
323 323
 
324 324
 	case PR_SET_PTRACER:

+ 1
- 1
print_sigevent.c View File

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

+ 1
- 1
s390.c View File

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

+ 8
- 7
signal.c View File

@@ -442,19 +442,20 @@ SYS_FUNC(sigprocmask)
442 442
 
443 443
 SYS_FUNC(kill)
444 444
 {
445
-	tprintf("%d, %s",
446
-		(int) tcp->u_arg[0],
447
-		signame(tcp->u_arg[1]));
445
+	/* pid */
446
+	tprintf("%d, ", (int) tcp->u_arg[0]);
447
+	/* signal */
448
+	printsignal(tcp->u_arg[1]);
448 449
 
449 450
 	return RVAL_DECODED;
450 451
 }
451 452
 
452 453
 SYS_FUNC(tgkill)
453 454
 {
454
-	tprintf("%d, %d, %s",
455
-		(int) tcp->u_arg[0],
456
-		(int) tcp->u_arg[1],
457
-		signame(tcp->u_arg[2]));
455
+	/* tgid, tid */
456
+	tprintf("%d, %d, ", (int) tcp->u_arg[0], (int) tcp->u_arg[1]);
457
+	/* signal */
458
+	printsignal(tcp->u_arg[2]);
458 459
 
459 460
 	return RVAL_DECODED;
460 461
 }

Loading…
Cancel
Save