I'm trying to setup a system where I can add python scripts to a directory, and the next time I load gdb they will be accessible (the point being to place this in version control and allow other engineers simple access to my helper scripts). For starters I've written a hello.py file, and when I type source /path/to/hello.py in gdb, and then type hello it works as expected.
How do I make GDB do this automatically? The documentation suggests using the data-directory, and placing scripts in data-directory/python/gdb/command. Placing my hello.py file in this directory does nothing though (however it does end up creating a hello.pyc file).
I've additionally tried adding this directory to my directory listing with dir /path/to/hello/ and then hoping to be able to type source hello.py but this also fails.