tc@box:/tmp$ gdb gtk3-demo
GNU gdb (GDB) 7.2
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 "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/gtk3-demo...done.
(gdb) break gdk_x_error
Function "gdk_x_error" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (gdk_x_error) pending.
(gdb) run --sync
Starting program: /usr/local/bin/gtk3-demo --sync

Breakpoint 1, gdk_x_error (xdisplay=0x9887ca8, error=0xbfca2e60)
    at gdkmain-x11.c:269
269	  if (error->error_code)
(gdb) bt full
#0  gdk_x_error (xdisplay=0x9887ca8, error=0xbfca2e60) at gdkmain-x11.c:269
No locals.
#1  0xb6f270ce in _XError () from /usr/lib/libX11.so.6
No symbol table info available.
#2  0xb6f28da4 in _XEventsQueued () from /usr/lib/libX11.so.6
No symbol table info available.
#3  0xb6f1a844 in XPending () from /usr/lib/libX11.so.6
No symbol table info available.
#4  0xb7278c55 in gdk_check_xpending (display=0x988d810)
    at gdkeventsource.c:266
No locals.
#5  0xb7278cbb in gdk_event_source_check (source=0x9881f70)
    at gdkeventsource.c:297
        event_source = 0x9881f70
        retval = <value optimized out>
#6  0xb6b415d2 in g_main_context_check () from /usr/local/lib/libglib-2.0.so.0
No symbol table info available.
#7  0xb6b41b65 in g_main_context_iterate.isra.21 ()
   from /usr/local/lib/libglib-2.0.so.0
No symbol table info available.
#8  0xb6b420ab in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.0
No symbol table info available.
#9  0xb74370ad in gtk_main () at gtkmain.c:1161
---Type <return> to continue, or q <return> to quit---
        loop = 0x9945bf0
#10 0x08056b76 in main (argc=2, argv=0xbfca3a04) at main.c:1005
        window = 0x988d8f8
        notebook = 0x988dac8
        hbox = 0x98de840
        tree = 0x988d9e0
(gdb) quit
