On 8/26/22 07:18, Helge Deller wrote:
Some of the guest signal numbers are currently not converted to
their representative names in the strace output, e.g. SIGVTALRM.

This patch introduces a smart way to generate and keep in sync the
host-to-guest and guest-to-host signal conversion tables for usage in
the qemu signal and strace code. This ensures that any signals
will now show up in both tables.

There is no functional change in this patch - with the exception that yet
missing signal names now show up in the strace code too.

Signed-off-by: Helge Deller <del...@gmx.de>
---
  linux-user/signal-common.h | 46 ++++++++++++++++++++++++++++++++++++++
  linux-user/signal.c        | 37 +++---------------------------
  linux-user/strace.c        | 31 +++++++++----------------
  3 files changed, 60 insertions(+), 54 deletions(-)

diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h
index 6a7e4a93fc..c2549bcd3e 100644
--- a/linux-user/signal-common.h
+++ b/linux-user/signal-common.h
@@ -118,4 +118,50 @@ static inline void finish_sigsuspend_mask(int ret)
      }
  }

+#ifdef SIGSTKFLT
+#define MAKE_SIG_ENTRY_SIGSTKFLT        MAKE_SIG_ENTRY(SIGSTKFLT)
+#else
+#define MAKE_SIG_ENTRY_SIGSTKFLT
+#endif
+
+#ifdef SIGIOT
+#define MAKE_SIG_ENTRY_SIGIOT           MAKE_SIG_ENTRY(SIGIOT)
+#else
+#define MAKE_SIG_ENTRY_SIGIOT
+#endif


This doesn't compile when TARGET_SIGIOT does not exist, e.g. qemu-arm.


r~

Reply via email to