gdb 设置覆盖日志记录应该覆盖 gdb.txt 正确吗?

gdb 设置覆盖日志记录应该覆盖 gdb.txt 正确吗?

我在看记录输出并一直在尝试这个特定的命令 -

set logging overwrite on

AFAI 明白了,该命令应该覆盖 gdb.txt 的内容,但事实并非如此。那里有错误或者我没有正确理解含义/语法。

我在跑步 -

[$] gdb --version                                                                                                                  
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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".

这是在 Debian 上进行的测试。

看着 :不稳定的 gdb 包(版本 7.12-6)中的错误

并没有告诉我太多,但我不是 gdb 专家,甚至不是中级用户。如果有人知道引用上述行为的错误,请分享,或者如果我缺乏理解,也请分享。

更新 -

确切的命令是 -

$ gdb qbittorrent 
(gdb) set logging overwrite on 
(gdb) set pagination 0
(gdb) run

当应用程序通过 - 挂起/崩溃时

QXcbConnection: XCB error: 3 (BadWindow), sequence: 16699, resource id: 14227177, major code: 40 (TranslateCoords), minor code: 0
pure virtual method called
terminate called without an active exception

Thread 1 "qbittorrent" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. 

我做了必要的事情 -

(gdb) bt
(gdb) bt full
(gdb) thread apply all bt

现在我期望使用overwrite on命令 gdb 会覆盖当前会话中的 gdb.txt 内容并覆盖文件的时间戳,但两者都没有发生。幸运的是,我没有关闭会话,因此能够将调试会话内容复制到维护者和上游,以便他们可以仔细查看发生的情况。

我很好奇/不明白为什么它没有进行更改,或者我理解错误。

答案1

您错过了实际的日志记录 ( set logging on):

(gdb) set logging overwrite on
(gdb) set logging on

相关内容