$ G_DEBUG="fatal_warnings" GDK_DEBUG=EVENTS gdb --command script.txt test.exe
GNU gdb (GDB) 7.0.50.20100202
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from d:\dev\gnome.org\gnome-windows\prefix\test/test.exe...done.
Function "g_main_context_prepare" not defined.
Breakpoint 1 (g_main_context_prepare) pending.
[New Thread 237220.0x39b48]
input_locale:08130409, codepage:1252
[New Thread 237220.0x38d44]
WM_GETMINMAXINFO 00410620 (no GdkWindow) DefWindowProcW => 0
WM_NCCREATE 00410620 (no GdkWindow) DefWindowProcW => 1
WM_NCCALCSIZE 00410620 (no GdkWindow) DefWindowProcW => 0
WM_CREATE 00410620 DefWindowProcW => 0
WM_SETTEXT 00410620 DefWindowProcWwarning: BTMMHOOK 18.08.2010 11:36:39 Thread<39B48> Hook DLL loaded

 => 1
WM_SETICON 00410620 DefWindowProcW
  WM_GETICON 00410620 DefWindowProcW => 0
  WM_GETICON 00410620 DefWindowProcW => 0
  WM_GETICON 00410620 DefWindowProcW => 0 => 0
WM_SETICON 00410620 DefWindowProcW => 0
WM_WINDOWPOSCHANGING 00410620 NOMOVE|NOSIZE 00C90530 0x0@+0+0 now below 00C90530 DefWindowProcW => 0
WM_WINDOWPOSCHANGING 00410620 NOMOVE|NOSIZE 00C90530 0x0@+0+0 now below 00C90530 DefWindowProcW => 0
WM_ACTIVATEAPP 00410620 YES thread: 4608 DefWindowProcW => 0
WM_NCACTIVATE 00410620 DefWindowProcW
  WM_GETICON 00410620 DefWindowProcW => 0
  WM_GETICON 00410620 DefWindowProcW => 0
  WM_GETICON 00410620 DefWindowProcW => 0 => 1
WM_ACTIVATE 00410620 ACTIVE 00000000 DefWindowProcW
  WM_SETFOCUS 00410620
    ===> GDK_FOCUS_CHANGE 00410620 IN => 0 => 0
WM_SHOWWINDOW 00410620 YES ShowWindow
  ===> GDK_MAP 00410620  => 0
WM_WINDOWPOSCHANGING 00410620 NOMOVE|NOSIZE|SHOWWINDOW 00C90530 0x0@+0+0 now below 00C90530 DefWindowProcW => 0
WM_NCPAINT 00410620 DefWindowProcW => 0
WM_ERASEBKGND 00410620 CB011B2C => 1
WM_WINDOWPOSCHANGED 00410620 NOMOVE|NOSIZE|NOZORDER|SHOWWINDOW 00C90530 208x227@+22+22 DefWindowProcW => 0
WM_NCCALCSIZE 00410620 DefWindowProcW => 0
WM_NCPAINT 00410620 DefWindowProcW => 0
WM_ERASEBKGND 00410620 CB011B2C => 1
WM_SIZE 00410620 RESTORED 200x200
  ===> GDK_CONFIGURE 00410620 x:26 y:45 w:200 h:200 => 0
WM_MOVE 00410620 (26,45)
  ===> GDK_CONFIGURE 00410620 x:26 y:45 w:200 h:200 => 0
WM_GETICON 00410620 DefWindowProcW => 0
WM_GETICON 00410620 DefWindowProcW => 0
WM_GETICON 00410620 DefWindowProcW => 0
WM_PAINT 00410620 200x200@+0+0  dc CB011B2C DefWindowProcW => 0
_gdk_windowing_window_queue_antiexpose: ValidateRgn 00410620 200x200@+0+0
WM_NCACTIVATE 00410620 DefWindowProcW => 1
WM_ACTIVATE 00410620 INACTIVE 00000000 DefWindowProcW => 0
WM_ACTIVATEAPP 00410620 NO thread: 2076 DefWindowProcW => 0
WM_KILLFOCUS 00410620
  ===> GDK_FOCUS_CHANGE 00410620 OUT => 0
WM_WINDOWPOSCHANGING 00410620 NOMOVE|NOSIZE 00C90530 0x0@+0+0 now below 00C90530 DefWindowProcW => 0
WM_ACTIVATEAPP 00410620 YES thread: 2076 DefWindowProcW => 0
WM_NCACTIVATE 00410620 DefWindowProcW => 1
WM_ACTIVATE 00410620 ACTIVE 00000000 DefWindowProcW
  WM_SETFOCUS 00410620
    ===> GDK_FOCUS_CHANGE 00410620 IN => 0 => 0
WM_GETICON 00410620 DefWindowProcW => 0

Breakpoint 1, g_main_context_prepare (context=0xbcf318, priority=0x22fe78) at gmain.c:2202
2202      gint n_ready = 0;
(gdb) s
2203      gint current_priority = G_MAXINT;
(gdb) s
2206      if (context == NULL)
(gdb) s
2209      LOCK_CONTEXT (context);
(gdb) s
g_mutex_lock_win32_cs_impl (mutex=0xbcf410) at gthread-win32.c:125
125       EnterCriticalSection (*(CRITICAL_SECTION **)mutex);
(gdb) s
126     }
(gdb) s
g_main_context_prepare (context=0xbcf318, priority=0x22fe78) at gmain.c:2211
2211      context->time_is_current = FALSE;
(gdb) s
2213      if (context->in_check_or_prepare)
(gdb) s
2222      if (context->poll_waiting)
(gdb) s
2229      context->poll_waiting = TRUE;
(gdb) s
2246      for (i = 0; i < context->pending_dispatches->len; i++)
(gdb) s
2251      g_ptr_array_set_size (context->pending_dispatches, 0);
(gdb) s
g_ptr_array_set_size (farray=0xb82050, length=0) at garray.c:992
992       GRealPtrArray* array = (GRealPtrArray*) farray;
(gdb) s
994       g_return_if_fail (array);
(gdb) s
996       if (length > array->len)
(gdb) s
1009      else if (length < array->len)
(gdb) s
1012      array->len = length;
(gdb) s
1013    }
(gdb) s
g_main_context_prepare (context=0xbcf318, priority=0x22fe78) at gmain.c:2255
2255      context->timeout = -1;
(gdb) s
2257      source = next_valid_source (context, NULL);
(gdb) s
next_valid_source (context=0xbcf318, source=0x0) at gmain.c:2000
2000      GSource *new_source = source ? source->next : context->source_list;
(gdb) s
2002      while (new_source)
(gdb) s
2004          if (!SOURCE_DESTROYED (new_source))
(gdb) s
2006              new_source->ref_count++;
(gdb) s
2007              break;
(gdb) s
2013      if (source)
(gdb) s
2016      return new_source;
(gdb) s
2017    }
(gdb) s
g_main_context_prepare (context=0xbcf318, priority=0x22fe78) at gmain.c:2258
2258      while (source)
(gdb) s
2260          gint source_timeout = -1;
(gdb) s
2262          if ((n_ready > 0) && (source->priority > current_priority))
(gdb) s
2267          if (SOURCE_BLOCKED (source))
(gdb) s
2270          if (!(source->flags & G_SOURCE_READY))
(gdb) s
2276              prepare = source->source_funcs->prepare;
(gdb) s
2277              context->in_check_or_prepare++;
(gdb) s
2278              UNLOCK_CONTEXT (context);
(gdb) s
g_mutex_unlock_win32_cs_impl (mutex=0xbcf410) at gthread-win32.c:137
137       LeaveCriticalSection (*(CRITICAL_SECTION **)mutex);
(gdb) s
138     }
(gdb) s
g_main_context_prepare (context=0xbcf318, priority=0x22fe78) at gmain.c:2280
2280              result = (*prepare) (source, &source_timeout);
(gdb) s
gdk_event_prepare (source=0xbcf298, timeout=0x22fe24) at gdkevents-win32.c:3326
3326      GDK_THREADS_ENTER ();
(gdb) s
3328      *timeout = -1;
(gdb) s
3330      retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(gdb) s
_gdk_event_queue_find_first (display=0xb87028) at gdkevents.c:67
67        GList *tmp_list = display->queued_events;
(gdb) s
69        while (tmp_list)
(gdb) s
78        return NULL;
(gdb) s
79      }
(gdb) s
gdk_event_prepare (source=0xbcf298, timeout=0x22fe24) at gdkevents-win32.c:3331
3331                (modal_win32_dialog == NULL &&
(gdb) print retval
$1 = 12382872
(gdb) s
3330      retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(gdb) s
3332                 PeekMessageW (&msg, NULL, 0, 0, PM_NOREMOVE)));
(gdb) s
unk-0x313 00410620 DefWindowProcW
  WM_NCACTIVATE 00410620 DefWindowProcW => 1
  WM_WINDOWPOSCHANGING 00410620 NOMOVE|NOSIZE 00C90530 0x0@+0+0 now below 002C03C8 DefWindowProcW => 0
  WM_WINDOWPOSCHANGED 00410620 NOMOVE|NOSIZE 00C90530 208x227@+22+22 DefWindowProcW => 0
  WM_ENTERMENULOOP 00410620 DefWindowProcW => 0
  WM_SETCURSOR 00410620 0x2 0 DefWindowProcW => 0
  WM_INITMENU 00410620 DefWindowProcW => 0
  WM_INITMENUPOPUP 00410620 DefWindowProcW => 0
Breakpoint 1, g_main_context_prepare (context=0xbcf318, priority=0x22f930) at gmain.c:2202
2202      gint n_ready = 0;
(gdb) bt full
#0  g_main_context_prepare (context=0xbcf318, priority=0x22f930) at gmain.c:2202
        i = 1
        n_ready = 4086176
        current_priority = 2291960
        source = 0xbcf3e0
#1  0x685ef76d in g_main_context_iterate (context=0xbcf318, block=0, dispatch=0, self=0x3e59a0) at gmain.c:2571
        max_priority = 2292048
        timeout = 2292068
        some_ready = 1707348764
        nfds = 12383200
        allocated_nfds = 2
        fds = 0xbf7f00
        __PRETTY_FUNCTION__ = "g_main_context_iterate"
#2  0x685ef952 in g_main_context_pending (context=0xbcf318) at gmain.c:2619
        retval = 4111696
#3  0x6c38567a in modal_timer_proc (hwnd=0x0, msg=275, id=8277, time=668818437) at gdkevents-win32.c:1654
        arbitrary_limit = 1
#4  0x7e418734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
No symbol table info available.
#5  0x00000000 in ?? ()
No symbol table info available.
(gdb) Quit (expect signal SIGINT when the program is resumed)
