public inbox for
 help / color / mirror / Atom feed
* mingw build
       [not found] <>
@ 2019-10-28 18:02 ` Hannes Domani via insight
  0 siblings, 0 replies; only message in thread
From: Hannes Domani via insight @ 2019-10-28 18:02 UTC (permalink / raw)
  To: insight


I built the latest source from, and can start the insight executable.
But after startup the window immediately freezes, I can do nothing at all.

From what I can tell there is no message loop running for the windows.
It first thought it's supposed to be the message loop in Tcl_WaitForEvent(), but that one is overridden
with gdbtk_notifier_wait_for_event(), so that's not it.

As a workaround, I figured I could just (mis-)use the mingw gdb_select() implementation:

--- a/gdb/mingw-hdep.c
+++ b/gdb/mingw-hdep.c
@@ -124,13 +124,24 @@ gdb_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,

   gdb_assert (num_handles <= MAXIMUM_WAIT_OBJECTS);

-  event = WaitForMultipleObjects (num_handles,
+  event = MsgWaitForMultipleObjects (num_handles,
                                  ? (timeout->tv_sec * 1000
                                     + timeout->tv_usec / 1000)
-                                 : INFINITE);
+                                 : INFINITE,
+                                 QS_ALLINPUT);
+  if (event == WAIT_OBJECT_0 + num_handles)
+    {
+      MSG msg;
+      while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+       {
+         TranslateMessage(&msg);
+         DispatchMessage(&msg);
+       }
+      return 0;
+    }
   /* EVENT can only be a value in the WAIT_ABANDONED_0 range if the
      HANDLES included an abandoned mutex.  Since GDB doesn't use
      mutexes, that should never occur.  */

Like this I can actually start doing something, but this doesn't look correct to me.

Also this is fine as long as the target isn't running because then I get stuck in target_wait.
From the comments above x_event() it seems that deprecated_ui_loop_hook() is supposed to take care of this,
and it actually is called in windows_nat_target::wait(), but then I just get into Tcl_WaitForEvent() as described earlier.

I'm also having a lot of problems with the UI, like error message dialogs when I press any button (even if it works),
but that's secondary until the message loop is working.

Domani Hannes

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-28 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2019-10-28 18:02 ` mingw build Hannes Domani via insight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).