gpt4 book ai didi

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

转载 作者:可可西里 更新时间:2023-11-01 13:17:24 24 4
gpt4 key购买 nike

这是一个看似微不足道的问题,但我找不到一个简单的方法来完成它。

我的 .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当前 目录。

关于windows - 如何在 gdb 启动时加载 .gdbinit?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15399265/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com