mingw build
"Hannes Domani via insight" <[email protected]> Mon, 28 Oct 2019 18:01:58 +0000 (UTC)
| Newsgroups | gmane.comp.debugging.insight |
|---|---|
| Message-ID | <[email protected]> |
Hello
I built the latest source from https://sourceware.org/git/?p=3Dinsight.git,=
and can start the insight executable.
But after startup the window immediately freezes, I can do nothing at all.
=46rom 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() im=
plementation:
--- 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,
=C2=A0=C2=A0 gdb_assert (num_handles <=3D MAXIMUM_WAIT_OBJECTS);
-=C2=A0 event =3D WaitForMultipleObjects (num_handles,
+=C2=A0 event =3D MsgWaitForMultipleObjects (num_handles,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 handles,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 FALSE,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0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=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 QS_ALLINPUT);
+=C2=A0 if (event =3D=3D WAIT_OBJECT_0 + num_handles)
+=C2=A0=C2=A0=C2=A0 {
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 MSG msg;
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 while (PeekMessage(&msg, NULL, 0, 0, PM_REM=
OVE))
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TranslateMessage(&msg);
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DispatchMessage(&msg);
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0;
+=C2=A0=C2=A0=C2=A0 }
=C2=A0=C2=A0 /* EVENT can only be a value in the WAIT_ABANDONED_0 range if =
the
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 HANDLES included an abandoned mutex.=C2=A0 S=
ince GDB doesn't use
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mutexes, that should never occur.=C2=A0 */
Like this I can actually start doing something, but this doesn't look corre=
ct to me.
Also this is fine as long as the target isn't running because then I get st=
uck in target_wait.
From the comments above x_event() it seems that deprecated_ui_loop_hook() i=
s supposed to take care of this,
and it actually is called in windows_nat_target::wait(), but then I just ge=
t into Tcl_WaitForEvent() as described earlier.
I'm also having a lot of problems with the UI, like error message dialogs w=
hen I press any button (even if it works),
but that's secondary until the message loop is working.
Regards
Domani Hannes