[Lldb-commits] [PATCH] D122486: [lldb] Fix building for mingw after changes to sigtstp_handler

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 25 08:48:45 PDT 2022


mstorsjo created this revision.
mstorsjo added a reviewer: labath.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLDB.

Some signal handlers are set up within an !_MSC_VER condition,
i.e. omitted in MSVC builds but included in mingw builds. Previously
sigtstp_handler was defined in all builds, but since
4bcadd66864bf4af929ac8753a51d7ad408cdef0 <https://reviews.llvm.org/rG4bcadd66864bf4af929ac8753a51d7ad408cdef0> / D120320 <https://reviews.llvm.org/D120320> it's only
defined non platforms other than Windows.

This applies a matching ifdef around the usage of sigtstp_handler.

Alternatively the ifdef condition could be changed from !_MSC_VER
to !_WIN32 - I'm unsure whether the other ones that are hooked up
in mingw builds but not in MSVC builds actually ever make a difference
in mingw builds.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122486

Files:
  lldb/tools/driver/Driver.cpp


Index: lldb/tools/driver/Driver.cpp
===================================================================
--- lldb/tools/driver/Driver.cpp
+++ lldb/tools/driver/Driver.cpp
@@ -832,7 +832,9 @@
 #if !defined(_MSC_VER)
   signal(SIGPIPE, SIG_IGN);
   signal(SIGWINCH, sigwinch_handler);
+#if !defined(_WIN32)
   signal(SIGTSTP, sigtstp_handler);
+#endif
 #endif
 
   int exit_code = 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122486.418241.patch
Type: text/x-patch
Size: 381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220325/dabaf81e/attachment.bin>


More information about the lldb-commits mailing list