1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 # loader for .gdbinit file
7 # This file provides a guard against multiple inclusion. GDB command syntax is
8 # rather limited in that you cannot have a `documentation` command inside of an
9 # `if`. So we use a separate loader file that sources `.gdbinit` within the
12 # You may need to put an 'add-auto-load-safe-path' command in your
13 # $HOME/.gdbinit file to get GDB to trust this file. If your builds are
14 # generally in $HOME/moz, then you can say:
16 # add-auto-load-safe-path ~/moz
18 # Multiple include guard
19 if $_moz_gdbinit_loaded
22 set $_moz_gdbinit_loaded=1
24 source -s build/.gdbinit
26 # This requires $objdir to have been added to gdb's source directory search
27 # path. Normally this will be done by libxul.so-gdb.py or js-gdb.py.
28 source -s build/.gdbinit.py