This sets up API to release OutputSurface from LTHClient.
[chromium-blink-merge.git] / docs / linux_debugging_gtk.md
blobf4330a36dabc2e971948b3d9d71392adbebb27ae
1 # Linux Debugging GTK
3 ## Making warnings fatal
5 See
6 [Running GLib Applications](http://developer.gnome.org/glib/stable/glib-running.html)
7 for notes on how to make GTK warnings fatal.
9 ## Using GTK Debug packages
11     sudo apt-get install libgtk2.0-0-dbg
13 Make sure that you're building a binary that matches your architecture (e.g.
14 64-bit on a 64-bit machine), and there you go.
16 ### Source
18 You'll likely want to get the source for gtk too so that you can step through
19 it. You can tell gdb that you've downloaded the source to your system's GTK by
20 doing:
22 ```shell
23 $ cd /my/dir
24 $ apt-get source libgtk2.0-0
25 $ gdb ...
26 (gdb) set substitute-path /build/buildd /my/dir
27 ```
29 NOTE: I tried debugging pango in a similar manner, but for some reason gdb
30 didn't pick up the symbols from the symbols from the `-dbg` package. I ended up
31 building from source and setting my `LD_LIBRARY_PATH`.
33 See [linux_building_debug_gtk.md](linux_building_debug_gtk.md) for more on how
34 to build your own debug version of GTK.
36 ## Parasite
38 http://chipx86.github.com/gtkparasite/ is great. Go check out the site for more
39 about it.
41 Install it with
43     sudo apt-get install gtkparasite
45 And then run Chrome with
47     GTK_MODULES=gtkparasite ./out/Debug/chrome
49 ### ghardy
51 If you're within the Google network on ghardy, which is too old to include
52 gtkparasite, you can do:
54     scp bunny.sfo:/usr/lib/gtk-2.0/modules/libgtkparasite.so /tmp
55     sudo cp /tmp/libgtkparasite.so /usr/lib/gtk-2.0/modules/libgtkparasite.so
57 ## GDK_DEBUG
59 Use `GDK_DEBUG=nograbs` to run GTK+ without grabs. This is useful for gdb
60 sessions.