I am enabling gdb for Python support with Python 3.6.9 and gdb 8.1.0 on Ubuntu 18.04.
In the document https://devguide.python.org/gdb/ it says, "When CPython is built you will notice a python-gdb.py file in the root directory of your checkout. Read the module docstring for details on how to use the file to enhance gdb for easier debugging of a CPython process. To activate support, you must add the directory containing python-gdb.py to GDB’s “auto-load-safe-path”. Put this in your ~/.gdbinit file: add-auto-load-safe-path /path/to/checkout"
On my distro (Ubuntu 18.04), gdb was installed by default, so I didn't build it from source with ./configure --with-python. At the time of install I did not anticipate needing Python support. When I search for python-gdb.py using locate python-gdb.py it shows that python-gdb.py does not exist.
My questions are:
Can I update my gdb installation to enable Python support?
What do I use for /path/to/checkout in the string "add-auto-load-safe-path /path/to/checkout."
Thanks for any help.