All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-user/strace: Add missing signal strings
@ 2019-11-19 18:51 Helge Deller
  2019-11-19 19:56 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Helge Deller @ 2019-11-19 18:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Laurent Vivier

Add the textual representations of some missing target signals.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 3d4d684450..18b57a9ef9 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -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);


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user/strace: Add missing signal strings
  2019-11-19 18:51 [PATCH] linux-user/strace: Add missing signal strings Helge Deller
@ 2019-11-19 19:56 ` Richard Henderson
  2019-11-19 20:06   ` Helge Deller
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2019-11-19 19:56 UTC (permalink / raw)
  To: Helge Deller, qemu-devel; +Cc: Philippe Mathieu-Daudé, Laurent Vivier

On 11/19/19 7:51 PM, Helge Deller wrote:
> Add the textual representations of some missing target signals.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 3d4d684450..18b57a9ef9 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -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.

> +#ifdef SIGSTKFLT
> +    case TARGET_SIGSTKFLT: signal_name = "SIGSTKFLT"; break;
> +#endif

Wrong ifdef.


r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user/strace: Add missing signal strings
  2019-11-19 19:56 ` Richard Henderson
@ 2019-11-19 20:06   ` Helge Deller
  2019-11-19 20:10     ` Helge Deller
  2019-11-19 20:17     ` Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Helge Deller @ 2019-11-19 20:06 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: Philippe Mathieu-Daudé, Laurent Vivier

On 19.11.19 20:56, Richard Henderson wrote:
> On 11/19/19 7:51 PM, Helge Deller wrote:
>> Add the textual representations of some missing target signals.
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>>
>> diff --git a/linux-user/strace.c b/linux-user/strace.c
>> index 3d4d684450..18b57a9ef9 100644
>> --- a/linux-user/strace.c
>> +++ b/linux-user/strace.c
>> @@ -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,*/

>> +#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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user/strace: Add missing signal strings
  2019-11-19 20:06   ` Helge Deller
@ 2019-11-19 20:10     ` Helge Deller
  2019-11-19 20:17     ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Helge Deller @ 2019-11-19 20:10 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: Philippe Mathieu-Daudé, Laurent Vivier

On 19.11.19 21:06, Helge Deller wrote:
> On 19.11.19 20:56, Richard Henderson wrote:
>> On 11/19/19 7:51 PM, Helge Deller wrote:
>>> Add the textual representations of some missing target signals.
>>>
>>> Signed-off-by: Helge Deller <deller@gmx.de>
>>>
>>> diff --git a/linux-user/strace.c b/linux-user/strace.c
>>> index 3d4d684450..18b57a9ef9 100644
>>> --- a/linux-user/strace.c
>>> +++ b/linux-user/strace.c
>>> @@ -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,*/
>
>>> +#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

OIC!
My code should to be:
#ifdef TARGET_SIGSTKFLT

Will resubmit after getting suggestions for the unused commented code.

Helge


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] linux-user/strace: Add missing signal strings
  2019-11-19 20:06   ` Helge Deller
  2019-11-19 20:10     ` Helge Deller
@ 2019-11-19 20:17     ` Richard Henderson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2019-11-19 20:17 UTC (permalink / raw)
  To: Helge Deller, qemu-devel; +Cc: Philippe Mathieu-Daudé, Laurent Vivier

On 11/19/19 9:06 PM, Helge Deller wrote:
>>> +#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~


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-19 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 18:51 [PATCH] linux-user/strace: Add missing signal strings Helge Deller
2019-11-19 19:56 ` Richard Henderson
2019-11-19 20:06   ` Helge Deller
2019-11-19 20:10     ` Helge Deller
2019-11-19 20:17     ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.