Tom Anderson | f06ac38 | 2019-04-10 03:49:38 | [diff] [blame] | 1 | # Usage of tools/gdb/gdbinit |
| 2 | |
| 3 | Usage of Chromium's [gdbinit](../tools/gdb/gdbinit) is recommended when |
| 4 | debugging with gdb on any platform. This is necessary for source-level debugging |
| 5 | when `strip_absolute_paths_from_debug_symbols` or `use_custom_libcxx` are |
| 6 | enabled (they're enabled by default), and also adds extra features like |
| 7 | pretty-printing of custom Chromium types. |
| 8 | |
| 9 | To use, add the following to your `~/.gdbinit` |
| 10 | |
| 11 | ``` |
| 12 | source /path/to/chromium/src/tools/gdb/gdbinit |
| 13 | ``` |
Henrique Ferreiro | 3c3fa8a8 | 2020-01-23 13:44:43 | [diff] [blame] | 14 | |
| 15 | *** promo |
| 16 | Notice that in components builds, the debug files will be loaded lazily. Because of this, the program needs to run at least once before breakpoints can be set. Alternatively, gdb will ask for confirmation as follows: |
| 17 | > Make breakpoint pending on future shared library load? (y or [n]) |
| 18 | *** |