xref: /aosp_15_r20/external/pytorch/.gdbinit (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1*da0073e9SAndroid Build Coastguard Worker# automatically load the pytoch-gdb extension.
2*da0073e9SAndroid Build Coastguard Worker#
3*da0073e9SAndroid Build Coastguard Worker# gdb automatically tries to load this file whenever it is executed from the
4*da0073e9SAndroid Build Coastguard Worker# root of the pytorch repo, but by default it is not allowed to do so due to
5*da0073e9SAndroid Build Coastguard Worker# security reasons. If you want to use pytorch-gdb, please add the following
6*da0073e9SAndroid Build Coastguard Worker# line to your ~/.gdbinit (i.e., the .gdbinit file which is in your home
7*da0073e9SAndroid Build Coastguard Worker# directory, NOT this file):
8*da0073e9SAndroid Build Coastguard Worker#    add-auto-load-safe-path /path/to/pytorch/.gdbinit
9*da0073e9SAndroid Build Coastguard Worker#
10*da0073e9SAndroid Build Coastguard Worker# Alternatively, you can manually load the pytorch-gdb commands into your
11*da0073e9SAndroid Build Coastguard Worker# existing gdb session by doing the following:
12*da0073e9SAndroid Build Coastguard Worker#    (gdb) source /path/to/pytorch/tools/gdb/pytorch-gdb.py
13*da0073e9SAndroid Build Coastguard Worker
14*da0073e9SAndroid Build Coastguard Workersource tools/gdb/pytorch-gdb.py
15