Skip to contentSkip to conversation

linux-user/strace: Add missing signal strings

PATCH Superseded Helge Deller 2 participants 5 messages Nov 19, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user/strace: Add missing signal strings

Add the textual representations of some missing target signals.

linux-user/strace.c +16 -0
index 3d4d684450..18b57a9ef9 100644
@@ -146,6 +146,22 @@ print_signal(abi_ulong arg, int last)
     case TARGET_SIGSTOP: signal_name = "SIGSTOP"; break;
     case TARGET_SIGTTIN: signal_name = "SIGTTIN"; break;
     case TARGET_SIGTTOU: signal_name = "SIGTTOU"; break;
+    case TARGET_SIGIO: signal_name = "SIGIO"; break;
+    case TARGET_SIGTRAP: signal_name = "SIGTRAP"; break;
+    /* case TARGET_SIGIOT: signal_name = "SIGIOT"; break; */
+#ifdef SIGSTKFLT
+    case TARGET_SIGSTKFLT: signal_name = "SIGSTKFLT"; break;
+#endif
+    case TARGET_SIGBUS: signal_name = "SIGBUS"; break;
+    case TARGET_SIGPWR: signal_name = "SIGPWR"; break;
+    case TARGET_SIGURG: signal_name = "SIGURG"; break;
+    case TARGET_SIGSYS: signal_name = "SIGSYS"; break;
+    case TARGET_SIGXCPU: signal_name = "SIGXCPU"; break;
+    case TARGET_SIGPROF: signal_name = "SIGPROF"; break;
+    case TARGET_SIGTSTP: signal_name = "SIGTSTP"; break;
+    case TARGET_SIGXFSZ: signal_name = "SIGXFSZ"; break;
+    case TARGET_SIGWINCH: signal_name = "SIGWINCH"; break;
+    case TARGET_SIGVTALRM: signal_name = "SIGVTALRM"; break;
     }
     if (signal_name == NULL) {
         print_raw_param("%ld", arg, last);
#1 lore raw
Quoted 9 lines · Helge Deller

Add the textual representations of some missing target signals.

linux-user/strace.c +0 -0
index 3d4d684450..18b57a9ef9 100644

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 151

Quoted 6 lines
linux-user/strace.c +3 -0
@@ -146,6 +146,22 @@ print_signal(abi_ulong arg, int last)
     case TARGET_SIGSTOP: signal_name = "SIGSTOP"; break;
     case TARGET_SIGTTIN: signal_name = "SIGTTIN"; break;
     case TARGET_SIGTTOU: signal_name = "SIGTTOU"; break;
+    case TARGET_SIGIO: signal_name = "SIGIO"; break;
+    case TARGET_SIGTRAP: signal_name = "SIGTRAP"; break;
+    /* case TARGET_SIGIOT: signal_name = "SIGIOT"; break; */

Unused commented code.

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 154

Quoted 3 lines
linux-user/strace.c +3 -0
+#ifdef SIGSTKFLT
+    case TARGET_SIGSTKFLT: signal_name = "SIGSTKFLT"; break;
+#endif

Wrong ifdef.

r~

#2 lore raw
Quoted 5 lines · Richard Henderson
Quoted 4 lines · Helge Deller

Add the textual representations of some missing target signals.

Quoted 13 lines

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 151

Quoted 11 lines
linux-user/strace.c +3 -0
index 3d4d684450..18b57a9ef9 100644
@@ -146,6 +146,22 @@ print_signal(abi_ulong arg, int last)
      case TARGET_SIGSTOP: signal_name = "SIGSTOP"; break;
      case TARGET_SIGTTIN: signal_name = "SIGTTIN"; break;
      case TARGET_SIGTTOU: signal_name = "SIGTTOU"; break;
+    case TARGET_SIGIO: signal_name = "SIGIO"; break;
+    case TARGET_SIGTRAP: signal_name = "SIGTRAP"; break;
+    /* case TARGET_SIGIOT: signal_name = "SIGIOT"; break; */

Unused commented code.

True, but I kept it intentionally the same as it's currently in linux-user/signal.c (line 40) so it's not forgotten if that changes:
/* [SIGIOT] = TARGET_SIGIOT,*/

Quoted 5 lines

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 154

Quoted 3 lines
linux-user/strace.c +3 -0
+#ifdef SIGSTKFLT
+    case TARGET_SIGSTKFLT: signal_name = "SIGSTKFLT"; break;
+#endif

Wrong ifdef.

Same here, see in linux-user/signal.c (line 50):
#ifdef SIGSTKFLT
[SIGSTKFLT] = TARGET_SIGSTKFLT,
#endif

Suggestions?

Helge

#3 lore raw
Quoted 30 lines · Helge Deller
Quoted 5 lines · Richard Henderson
Quoted 4 lines · Helge Deller

Add the textual representations of some missing target signals.

Quoted 13 lines

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 151

Quoted 11 lines
linux-user/strace.c +3 -0
index 3d4d684450..18b57a9ef9 100644
@@ -146,6 +146,22 @@ print_signal(abi_ulong arg, int last)
       case TARGET_SIGSTOP: signal_name = "SIGSTOP"; break;
       case TARGET_SIGTTIN: signal_name = "SIGTTIN"; break;
       case TARGET_SIGTTOU: signal_name = "SIGTTOU"; break;
+    case TARGET_SIGIO: signal_name = "SIGIO"; break;
+    case TARGET_SIGTRAP: signal_name = "SIGTRAP"; break;
+    /* case TARGET_SIGIOT: signal_name = "SIGIOT"; break; */

Unused commented code.

True, but I kept it intentionally the same as it's currently in linux-user/signal.c (line 40) so it's not forgotten if that changes:
/*    [SIGIOT] = TARGET_SIGIOT,*/

Quoted 5 lines

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 154

Quoted 3 lines
linux-user/strace.c +3 -0
+#ifdef SIGSTKFLT
+    case TARGET_SIGSTKFLT: signal_name = "SIGSTKFLT"; break;
+#endif

Wrong ifdef.

Quoted 4 lines

Same here, see in linux-user/signal.c (line 50):
#ifdef SIGSTKFLT
    [SIGSTKFLT] = TARGET_SIGSTKFLT,
#endif

OIC!
My code should to be:
#ifdef TARGET_SIGSTKFLT

Will resubmit after getting suggestions for the unused commented code.

Helge

#4 lore raw
In reply to Helge Deller
Quoted 10 lines · Helge Deller
Quoted 5 lines

linux-user/strace.c print_signal(abi_ulong arg, int last) · line 154

Quoted 3 lines
linux-user/strace.c +3 -0
+#ifdef SIGSTKFLT
+    case TARGET_SIGSTKFLT: signal_name = "SIGSTKFLT"; break;
+#endif

Wrong ifdef.

Same here, see in linux-user/signal.c (line 50):
#ifdef SIGSTKFLT
    [SIGSTKFLT] = TARGET_SIGSTKFLT,
#endif

But that one actually references SIGSTKFLT, but the case above does not. You probably don't need the ifdef at all.

r~