我无法加载位于当前目录中的.gdbinit中。 在启动GDB,我得到这样的:
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
warning: File "/home/user1/test/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
我可以通过启动GDB加载当前目录中的.gdbinit中:
gdb -iex 'add-auto-load-safe-path .'
作为描述在这里 。 但有没有办法设置$ debugdir包括当前目录?
试
$ export debugdir=.
$ gdb
产生与上述相同的警告。