sh-3.1$ G_DEBUG=fatal-warnings gdb gtk-demo
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 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 c:\dev\gnome.org\gnome-windows\checkout\gtk+\2.24\dist\bin\gtk-demo.exe...done.
(gdb) b convert_log_clusters_to_byte_offsets
Function "convert_log_clusters_to_byte_offsets" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (convert_log_clusters_to_byte_offsets) pending.
(gdb) r
Starting program: c:\dev\gnome.org\gnome-windows\checkout\gtk+\2.24\dist\bin\gtk-demo.exe
[New Thread 6964.0x19e8]
[New Thread 6964.0x12b0]

Breakpoint 1, convert_log_clusters_to_byte_offsets (text=0x498f478 ".ó \201Y", length=5, glyphs=0x3ec5dd0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/modules/basic/basic-win32.c:425
425       int n_chars = g_utf8_strlen (text, length);
(gdb) t a a bt f

Thread 2 (Thread 6964.0x12b0):
#0  0x7762013d in ntdll!RtlEnableEarlyCriticalSectionEventCreation () from C:\Windows\system32\ntdll.dll
No symbol table info available.
#1  0x7762013d in ntdll!RtlEnableEarlyCriticalSectionEventCreation () from C:\Windows\system32\ntdll.dll
No symbol table info available.
#2  0x764a0bdd in WaitForMultipleObjectsEx () from C:\Windows\syswow64\KernelBase.dll
No symbol table info available.
#3  0x00000002 in ?? ()
No symbol table info available.
#4  0x0491fe20 in ?? ()
No symbol table info available.
#5  0x765b1a2c in KERNEL32!GetVolumePathNamesForVolumeNameA () from C:\Windows\syswow64\kernel32.dll
No symbol table info available.
#6  0x0491fe20 in ?? ()
No symbol table info available.
#7  0x75fd086a in USER32!MessageBoxA () from C:\Windows\syswow64\user32.dll
No symbol table info available.
#8  0x00000002 in ?? ()
No symbol table info available.
#9  0x7efde000 in ?? ()
No symbol table info available.
#10 0x75fd0b69 in USER32!DdeNameService () from C:\Windows\syswow64\user32.dll
No symbol table info available.
#11 0x0000013c in ?? ()
No symbol table info available.
#12 0x0491ff68 in ?? ()
No symbol table info available.
#13 0x73347923 in gdiplus!GdipCreatePathIter () from C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\GdiPlus.dll
No symbol table info available.
#14 0x73347842 in gdiplus!GdipCreatePathIter () from C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\GdiPlus.dll
No symbol table info available.
#15 0x765b339a in KERNEL32!BaseCleanupAppcompatCacheSupport () from C:\Windows\syswow64\kernel32.dll
No symbol table info available.
#16 0x04712408 in ?? ()
No symbol table info available.
#17 0x77639ef2 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll
No symbol table info available.
#18 0x04712408 in ?? ()
No symbol table info available.
#19 0x77639ec5 in ntdll!RtlpNtSetValueKey () from C:\Windows\system32\ntdll.dll
No symbol table info available.
#20 0x73347832 in gdiplus!GdipCreatePathIter () from C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80\GdiPlus.dll
No symbol table info available.
#21 0x00000000 in ?? ()
No symbol table info available.

Thread 1 (Thread 6964.0x19e8):
#0  convert_log_clusters_to_byte_offsets (text=0x498f478 ".ó \201Y", length=5, glyphs=0x3ec5dd0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/modules/basic/basic-win32.c:425
        p = 0x493f3cc "dRì\003"
        charix = 1797822192
        glyphix = 76805068
        n_chars = 19052
        byte_offset = 0x2
        __PRETTY_FUNCTION__ = "convert_log_clusters_to_byte_offsets"
#1  0x6b28a198 in uniscribe_shape (font=0x3e1f960, text=0x498f478 ".ó \201Y", length=5, analysis=0x493f3cc, glyphs=0x3ec5dd0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/modules/basic/basic-win32.c:676
        wtext = 0x49aec78 L"."
        wlen = 3
        retval = 1
#2  0x6b28a3ca in basic_engine_shape (engine=0x3ec52f0, font=0x3e1f960, text=0x498f478 ".ó \201Y", length=5, analysis=0x493f3cc, glyphs=0x3ec5dd0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/modules/basic/basic-win32.c:740
        n_chars = 4
        i = 9941177
        p = 0x28f648 "xô\230\004\005"
        __PRETTY_FUNCTION__ = "basic_engine_shape"
#3  0x65590ab3 in _pango_engine_shape_shape (engine=0x3ec52f0, font=0x3e1f960, text=0x498f478 ".ó \201Y", length=5, analysis=0x493f3cc, glyphs=0x3ec5dd0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-engine.c:94
No locals.
#4  0x655a7180 in pango_shape (text=0x498f478 ".ó \201Y", length=5, analysis=0x493f3cc, glyphs=0x3ec5dd0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/shape.c:55
        i = 77011592
        last_cluster = 40925080
#5  0x655991f0 in shape_run (line=0x496c688, state=0x28f850, item=0x493f3c0) at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:3182
        layout = 0x3e8e638
        glyphs = 0x3ec5dd0
#6  0x655993f3 in process_item (layout=0x3e8e638, line=0x496c688, state=0x28f850, force_fit=0, no_break_at_end=0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:3293
        item = 0x493f3c0
        shape_set = 0
        width = 0
        length = 40925080
        i = 2684936
        processing_new_item = 0
        __PRETTY_FUNCTION__ = "process_item"
#7  0x65599bf9 in process_line (layout=0x3e8e638, state=0x28f850) at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:3591
        old_remaining_width = 75776
        item = 0x493f3c0
        result = BREAK_ALL_FIT
        old_num_chars = 2
        first_item_in_line = 1
        line = 0x496c688
        have_break = 1
        break_remaining_width = 98304
        break_start_offset = 68
        break_link = 0x493e210
        wrapped = 0
        __PRETTY_FUNCTION__ = "process_line"
#8  0x6559a533 in pango_layout_check_lines (layout=0x3e8e638) at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:3912
        delim_len = 0
        end = 0x498f47d ""
        delimiter_index = 77
        next_para_index = 77
        start = 0x498f430 "Some text to show that simple hypertext can easily be realized with tags.ó \201Y"
        done = 1
        start_offset = 0
        attrs = 0x496f470
        no_shape_attrs = 0x496f4a0
        iter = 0x496f490
        prev_base_dir = PANGO_DIRECTION_LTR
        base_dir = PANGO_DIRECTION_LTR
        state = {line_height = -1, remaining_height = -1, attrs = 0x496f470, items = 0x49688d0, base_dir = PANGO_DIRECTION_LTR, line_of_par = 1, glyphs = 0x0, start_offset = 72,
          properties = {uline = PANGO_UNDERLINE_NONE, strikethrough = 0, rise = 0, letter_spacing = 0, shape_set = 0, shape_ink_rect = 0x0, shape_logical_rect = 0x0},
          log_widths = 0x0, log_widths_offset = 0, line_start_index = 0, line_start_offset = 0, line_width = 459776, remaining_width = 75776}
        __PRETTY_FUNCTION__ = "pango_layout_check_lines"
#9  0x6559cf36 in pango_layout_get_iter (layout=0x3e8e638) at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:5539
        run_start_index = 1451112405
        iter = 0x3e184d0
        logical_rect = {x = 9941177, y = 77127664, width = 77127472, height = 77}
        __PRETTY_FUNCTION__ = "pango_layout_get_iter"
#10 0x65596ed4 in pango_layout_index_to_line_and_extents (layout=0x3e8e638, index=77, line_rect=0x28f994)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:1623
        iter = 0xffffffff
        line = 0x0
#11 0x65597e87 in pango_layout_get_cursor_pos (layout=0x3e8e638, index=77, strong_pos=0x28fa34, weak_pos=0x28fa24)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/pango/pango-layout.c:2253
        dir1 = PANGO_DIRECTION_RTL
        line_rect = {x = 0, y = 0, width = 27259265, height = 76989896}
        layout_line = 0x0
        x1_trailing = 77127664
        x2 = 27285594
        __PRETTY_FUNCTION__ = "pango_layout_get_cursor_pos"
#12 0x01a176aa in add_cursor (layout=0x3e8b538, display=0x49e1c78, seg=0x498e448, start=77) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextlayout.c:1759
        strong_pos = {x = 77001792, y = 2685528, width = -1, height = 77132925}
        weak_pos = {x = -1, y = 2685528, width = 1700354752, height = 65594936}
        cursor = 0x0
        add_weak = 0
        add_strong = 0
#13 0x01a18a02 in gtk_text_layout_get_line_display (layout=0x3e8b538, line=0x498df30, size_only=1)
    at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextlayout.c:2462
        priv = 0x3e8b588
        display = 0x49e1c78
        seg = 0x0
        iter = {dummy1 = 0x498dff0, dummy2 = 0x498df30, dummy3 = 0, dummy4 = -1, dummy5 = -1, dummy6 = -1, dummy7 = 292734472, dummy8 = 1451112405, dummy9 = 0x498eeb0,
          dummy10 = 0x498e4b8, dummy11 = 0, dummy12 = -1, dummy13 = 65414216, dummy14 = 0x1}
        style = 0x498e750
        text = 0x498f370 "Some text to show that simple hypertext can easily be realized with tags.ó \201Y\n««««««««î_"
        attrs = 0x4968740
        text_allocated = 78
        layout_byte_offset = 77
        buffer_byte_offset = 78
        extents = {x = 16, y = 77507648, width = 1671783972, height = 7}
        para_values_set = 1
        cursor_byte_offsets = 0x493e688
        cursor_segs = 0x493e348
        tmp_list1 = 0x493e688
        tmp_list2 = 0x493e348
        saw_widget = 0
        base_dir = PANGO_DIRECTION_LTR
        tags = 0x4970608
        initial_toggle_segments = 0
        __PRETTY_FUNCTION__ = "gtk_text_layout_get_line_display"
#14 0x01a168b9 in gtk_text_layout_real_wrap (layout=0x3e8b538, line=0x498df30, line_data=0x498ee88)
    at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextlayout.c:1167
        display = 0x28fc7c
        __PRETTY_FUNCTION__ = "gtk_text_layout_real_wrap"
#15 0x01a15b29 in gtk_text_layout_wrap (layout=0x3e8b538, line=0x498df30, line_data=0x498ee88) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextlayout.c:707
No locals.
#16 0x019fbb7a in _gtk_text_btree_validate_line (tree=0x498dff0, line=0x498df30, view_id=0x3e8b538)
    at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextbtree.c:5426
        ld = 0x498ee88
        view = 0x498ebe0
        __PRETTY_FUNCTION__ = "_gtk_text_btree_validate_line"
#17 0x01a165d0 in gtk_text_layout_validate_yrange (layout=0x3e8b538, anchor=0x28fc7c, y0=-900, y1=900)
    at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextlayout.c:1082
        old_height = 15
        new_height = 65821872
        line_data = 0x498ee88
        line = 0x498df30
        first_line = 0x0
        last_line = 0x0
        seen = 0
        delta_height = 0
        first_line_y = 0
        last_line_y = 0
        __PRETTY_FUNCTION__ = "gtk_text_layout_validate_yrange"
#18 0x01a261d3 in gtk_text_view_flush_scroll (text_view=0x3ec6220) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextview.c:1997
        iter = {dummy1 = 0x498dff0, dummy2 = 0x498df30, dummy3 = 77, dummy4 = -1, dummy5 = -1, dummy6 = -1, dummy7 = 292734472, dummy8 = 1451112405, dummy9 = 0x498df90,
          dummy10 = 0x49e1c38, dummy11 = 0, dummy12 = -1, dummy13 = 1, dummy14 = 0x3e8e238}
        scroll = 0x49e1bf8
        retval = 65610144
        widget = 0x3ec6220
#19 0x01a2987e in gtk_text_view_flush_first_validate (text_view=0x3ec6220) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextview.c:3608
        __PRETTY_FUNCTION__ = "gtk_text_view_flush_first_validate"
#20 0x01a298ed in first_validate_callback (data=0x3ec6220) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtktextview.c:3629
        text_view = 0x3ec6220
#21 0x6c341939 in gdk_threads_dispatch (data=0x4968570) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gdk/gdk.c:512
        dispatch = 0x4968570
        ret = 0
#22 0x009397e0 in g_idle_dispatch (source=0x49ea6a0, callback=0x6c3418f5 <gdk_threads_dispatch>, user_data=0x4968570)
    at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gmain.c:4631
No locals.
#23 0x00937617 in g_main_dispatch (context=0x3e61f50) at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gmain.c:2512
        dispatch = 0x9397a6 <g_idle_dispatch>
        was_in_call = 0
        user_data = 0x4968570
        callback = 0x6c3418f5 <gdk_threads_dispatch>
        cb_funcs = 0x9b2e30
        cb_data = 0x49eac90
        need_destroy = 2686440
        current_source_link = {data = 0x49ea6a0, next = 0x0}
        source = 0x49ea6a0
        current = 0x493e230
        i = 0
        __PRETTY_FUNCTION__ = "g_main_dispatch"
#24 0x00938147 in g_main_context_dispatch (context=0x3e61f50) at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gmain.c:3049
No locals.
#25 0x00938322 in g_main_context_iterate (context=0x3e61f50, block=1, dispatch=1, self=0x493c280) at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gmain.c:3120
        max_priority = 108
        timeout = 0
        some_ready = 1
        nfds = 2
        allocated_nfds = 2
        fds = 0x49b1ce8
#26 0x0093870c in g_main_loop_run (loop=0x49b18e8) at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gmain.c:3314
        self = 0x493c280
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#27 0x0193b279 in gtk_main () at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/gtk/gtkmain.c:1256
        tmp_list = 0x0
        functions = 0x0
        init = 0x3
        loop = 0x49b18e8
#28 0x0041d6aa in main (argc=1, argv=0x2705a38) at c:/dev/gnome.org/gnome-windows/checkout/gtk+/2.24/src/demos/gtk-demo/main.c:1010
        window = 0x3e1f008
        notebook = 0x3ec30e0
        hbox = 0x3e8b010
        tree = 0x3ec3020
        tag = 0x493c000



Breakpoint 1, convert_log_clusters_to_byte_offsets (text=0x487a620 ".ó \201Y", length=5, glyphs=0x4858af0)
    at c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/modules/basic/basic-win32.c:425
425       int n_chars = g_utf8_strlen (text, length);
(gdb) n
426       int *byte_offset = g_new (int, n_chars);
(gdb) n
428       p = text;
(gdb) print text
$1 = 0x487a620 ".ó \201Y"
(gdb) print length
$2 = 5
(gdb) print glyphs
$3 = (PangoGlyphString *) 0x4858af0
(gdb) print glyphs->num_glyphs
$4 = 3
(gdb) print glyphs->log_clusters[0]
$5 = 0
(gdb) print glyphs->log_clusters[1]
$6 = 1
(gdb) print glyphs->log_clusters[2]
$7 = 2
(gdb) print glyphs->log_clusters[3]
$8 = -1163005939
(gdb) print n_chars
$9 = 2



(gdb) s
429       charix = 0;
(gdb)
430       while (p < text + length)
(gdb)
432           byte_offset[charix] = p - text;
(gdb)
433           charix++;
(gdb)
434           p = g_utf8_next_char (p);
(gdb)
430       while (p < text + length)
(gdb)
432           byte_offset[charix] = p - text;
(gdb)
433           charix++;
(gdb)
434           p = g_utf8_next_char (p);
(gdb)
430       while (p < text + length)
(gdb)
439       for (glyphix = 0; glyphix < glyphs->num_glyphs; glyphix++)
(gdb)
441           g_assert (glyphs->log_clusters[glyphix] < n_chars);
(gdb) print glyphix
$10 = 0
(gdb) s
442           glyphs->log_clusters[glyphix] = byte_offset[glyphs->log_clusters[glyphix]];
(gdb)
439       for (glyphix = 0; glyphix < glyphs->num_glyphs; glyphix++)
(gdb)
441           g_assert (glyphs->log_clusters[glyphix] < n_chars);
(gdb) p glyphix
$11 = 1
(gdb) s
442           glyphs->log_clusters[glyphix] = byte_offset[glyphs->log_clusters[glyphix]];
(gdb)
439       for (glyphix = 0; glyphix < glyphs->num_glyphs; glyphix++)
(gdb)
441           g_assert (glyphs->log_clusters[glyphix] < n_chars);
(gdb) p glyphix
$12 = 2
(gdb) s
g_assertion_message_expr (domain=0x6b28df4e "Pango", file=0x6b28defc "c:/dev/gnome.org/gnome-windows/checkout/pango/git/src/modules/basic/basic-win32.c", line=441,
    func=0x6b28e220 "convert_log_clusters_to_byte_offsets", expr=0x6b28ded4 "glyphs->log_clusters[glyphix] < n_chars")
    at c:/dev/gnome.org/gnome-windows/checkout/glib/git/src/glib/gtestutils.c:1870
