如何使用 gbdinit 文件解决源命令文件中的 gdb 错误?

问题描述 投票:0回答:1

全部。我正在尝试解决我的 gdb 版本上出现的错误。当我在命令行中输入 gdb 时,我得到:

GNU gdb (GDB) 13.1
Copyright (C) 2023 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-apple-darwin22.6.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
/Users/cdwalke8/.gdbinit:1: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
(gdb) 

请注意,它指出

/Users/cdwalke8/.gdbinit:1: Error in sourced command file: No symbol table is loaded.  Use the "file" command.

当我查看这个文件时,里面是这样的:

set startup-with-shell-off

这是什么意思以及如何解决?

gdb
1个回答
0
投票

我傻了...

命令应该是

set startup-with-shell off

© www.soinside.com 2019 - 2024. All rights reserved.