windows – 如何在gdb启动时加载.gdbinit?

这是一个似乎微不足道的问题,但我找不到一个简单的方法来实现这一目标.

我将.gdbinit文件定义在与gdb.exe存在的目录相同的目录中 – 这是在我的编译器的bin目录中.但是,当我运行gdb时,我得到了这个:

GNU gdb (GDB) 7.5.50.20120804-cvs
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 "i686-w64-mingw32".
For bug reporting instructions,please see:
<http://www.gnu.org/software/gdb/bugs/>.
warning: File "g:\Mingw32-4.6.3\bin\.gdbinit" auto-loading has been declined by
your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".

我查阅了关于自动加载here的手册,但它没有任何关于保持我添加保存的新安全路径!退出gdb并再次启动它,我添加的安全路径消失了.

我的.gdbinit包含我一直希望在启动时加载的设置.加载.gdbinit可能与环境无关,但在Windows下执行此操作最简单的方法是什么?还有一个附加约束,即.gdbinit不能驻留在我的主目录中 – 它必须与gdb.exe可执行文件位于同一路径中.

I have my .gdbinit file defined in the same directory as where gdb.exe exist

放入$HOME或当前目录.

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...