0
Files
android_webview
apps
ash
base
build
build_overrides
cc
chrome
chrome_elf
chromecast
chromeos
cloud_print
components
content
courgette
crypto
dbus
device
docs
accessibility
autofill
design
gpu
images
infra
ios
login
media
memory
memory-infra
privacy
process
security
speed
sync
testing
ui
OWNERS
README.md
accessibility.md
adding_to_third_party.md
android_accessing_cpp_enums_in_java.md
android_build_instructions.md
android_cast_build_instructions.md
android_debugging_instructions.md
android_emulator.md
android_logging.md
android_native_libraries.md
android_studio.md
android_test_instructions.md
angle_in_chromium.md
atom.md
bitmap_pipeline.md
browser_view_resizer.md
building_old_revisions.md
callback.md
ccache_mac.md
chrome_os_logging.md
chrome_settings.md
chromedriver_status.md
chromeos_build_instructions.md
chromium_browser_vs_google_chrome.md
chromoting_android_hacking.md
cipd.md
cl_respect.md
clang.md
clang_code_coverage_wrapper.md
clang_format.md
clang_static_analyzer.md
clang_tidy.md
clang_tool_refactoring.md
clion_dev.md
closure_compilation.md
cocoa_tips_and_tricks.md
code_coverage.md
code_reviews.md
component_build.md
cr_respect.md
cr_user_manual.md
cygwin_dll_remapping_failure.md
debugging_with_crash_keys.md
disassemble_code.md
documentation_best_practices.md
documentation_guidelines.md
eclipse.md
emacs.md
erc_irc.md
fuchsia_build_instructions.md
fuchsia_gardening.md
fuchsia_sdk_updates.md
get_the_code.md
git_cookbook.md
git_tips.md
google_play_services.md
graphical_debugging_aid_chromium_views.md
gtk_vs_views_gtk.md
gwp_asan.md
how_to_add_your_feature_flag.md
how_to_extend_web_test_framework.md
inlined_stack_traces.md
installation_at_vmware.md
ios_build_instructions.md
ios_infra.md
ios_voiceover.md
ipc_fuzzer.md
jumbo.md
kiosk_mode.md
linux_build_instructions.md
linux_building_debug_gtk.md
linux_cast_build_instructions.md
linux_cert_management.md
linux_chromium_arm.md
linux_chromium_packages.md
linux_crash_dumping.md
linux_debugging.md
linux_debugging_gtk.md
linux_debugging_ssl.md
linux_dev_build_as_default_browser.md
linux_development.md
linux_eclipse_dev.md
linux_graphics_pipeline.md
linux_gtk_theme_integration.md
linux_hw_video_decode.md
linux_minidump_to_core.md
linux_password_storage.md
linux_pid_namespace_support.md
linux_plugins.md
linux_profiling.md
linux_proxy_config.md
linux_running_asan_tests.md
linux_sandbox_ipc.md
linux_sandboxing.md
linux_suid_sandbox.md
linux_suid_sandbox_development.md
linux_sysroot.md
linux_zygote.md
luci_migration_faq.md
mac_build_instructions.md
mojo_guide.md
network_traffic_annotations.md
new_port_policy.md
old_chromoting_build_instructions.md
optimizing_web_uis.md
optional.md
origin_trials_integration.md
ozone_drm_for_linux.md
ozone_overview.md
parsing_test_results.md
piranha_plant.md
profiling.md
profiling_content_shell_on_android.md
proxy_auto_config.md
qtcreator.md
release_branch_guidance.md
retrieving_code_analysis_warnings.md
seccomp_sandbox_crash_dumping.md
servicification.md
static_initializers.md
sublime_ide.md
system_hardening_features.md
tab_helpers.md
test_descriptions.md
threading_and_tasks.md
threading_and_tasks_faq.md
tour_of_luci_ui.md
tpm_quick_ref.md
translation_screenshots.md
updating_clang.md
updating_clang_format_binaries.md
useful_urls.md
user_data_dir.md
user_handle_mapping.md
using_a_linux_chroot.md
using_build_runner.md
vanilla_msysgit_workflow.md
vscode.md
web_tests_linux.md
webui_explainer.md
webui_in_components.md
webview_policies.md
win_cross.md
win_order_files.md
windows_build_instructions.md
windows_split_dll.md
working_remotely_with_android.md
writing_clang_plugins.md
extensions
gin
google_apis
google_update
gpu
headless
infra
ios
ipc
jingle
mash
media
mojo
native_client_sdk
net
pdf
ppapi
printing
remoting
rlz
sandbox
services
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
webrunner
.clang-format
.eslintrc.js
.git-blame-ignore-revs
.gitattributes
.gitignore
.gn
.vpython
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
DEPS
ENG_REVIEW_OWNERS
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings
src/docs/linux_debugging_gtk.md
Tom Anderson 287339e073 Remove GTK2 code
GTK2 code was historically kept around to keep the electron build working.  But
as of Nov 26, 2017, electron now uses GTK3 [1], so it should now be safe to
remove all of the old GTK2-only code.

[1] https://github.com/electron/electron/issues/2927#issuecomment-347092515

BUG=876558
R=sky

Change-Id: I78402053ae508ccd8fc7ac73697a861bb1ebacf6
Reviewed-on: https://chromium-review.googlesource.com/1183858
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585265}
2018-08-22 21:52:02 +00:00

53 lines
1.3 KiB
Markdown

# Linux Debugging GTK
## Making warnings fatal
See
[Running GLib Applications](http://developer.gnome.org/glib/stable/glib-running.html)
for notes on how to make GTK warnings fatal.
## Using GTK Debug packages
sudo apt-get install libgtk-3-0-dbg
Make sure that you're building a binary that matches your architecture (e.g.
64-bit on a 64-bit machine), and there you go.
### Source
You'll likely want to get the source for gtk too so that you can step through
it. You can tell gdb that you've downloaded the source to your system's GTK by
doing:
```shell
$ cd /my/dir
$ apt-get source libgtk-3-0
$ gdb ...
(gdb) set substitute-path /build/buildd /my/dir
```
NOTE: I tried debugging pango in a similar manner, but for some reason gdb
didn't pick up the symbols from the symbols from the `-dbg` package. I ended up
building from source and setting my `LD_LIBRARY_PATH`.
See [linux_building_debug_gtk.md](linux_building_debug_gtk.md) for more on how
to build your own debug version of GTK.
## Parasite
http://chipx86.github.com/gtkparasite/ is great. Go check out the site for more
about it.
Install it with
sudo apt-get install gtkparasite
And then run Chrome with
GTK_MODULES=gtkparasite ./out/Debug/chrome
## GDK_DEBUG
Use `GDK_DEBUG=nograbs` to run GTK+ without grabs. This is useful for gdb
sessions.