Summary
Some GDB helper functions were added as part of WT-8158. They would be more useful if it were easy to auto-load them in GDB. A starting point is the wrapper tools/gdb/gdb.wt script that loads the other files in the directory. It does that via manually sourcing them, which isn't efficient or extensible.
We should look for ways to have the GDB functions auto-loaded when launching WiredTiger in GDB (or attaching). The documentation makes it seem as though that is possible. A first stage will involve creating a .gdbinit file which loads the default WiredTiger gdb scripts.
Motivation
GDB is part of every WiredTiger developers life - making our experience with it better and more consistent is a win to developer productivity.
Testing
Test that the auto-load solution works, and ask others on the team to try it out as well.
Documentation update
Describe in a comment somewhere the environment(s) on which auto-loading works and how to set it up.
Scope:
- Create a .gdbinit file which loads WiredTiger's gdb scripts.
- dump_insert_list.py
- dump_row_int.gdb
- wt_debug_script_update.py
- Add it to the repository under tools/gdb.
- If the spawnhost work is complete WT-11666 then also deploy the script to the correct location, or create a follow up ticket. Otherwise mention on that ticket that the .gdbinit file has been created.
- depends on
-
WT-11408 Tidy up the wt_debug_script_update.py gdb helper script
- Closed
-
WT-9286 Enhance existing GDB functions to be consistent
- Open
-
WT-8158 Add gdb helper scripts to WiredTiger repository
- Closed
- has to be done before
-
WT-11929 Clean up the hierarchy of the tools/gdb folder
- Open
- is depended on by
-
WT-9288 Include external functions in GDB auto loading
- Open
- related to
-
WT-11166 Create a setup script for WiredTiger spawn hosts
- Closed