gpt4 book ai didi

ubuntu - gdb本身崩溃时如何调试?

转载 作者:行者123 更新时间:2023-12-04 19:00:19 26 4
gpt4 key购买 nike

我遇到了崩溃(段错误),但我无法找到它发生的位置,因为一旦尝试 bt,gdb 就会崩溃。或 frame # .这发生在不同的系统上(尝试过 CentOS 7 和 Ubuntu 17.04),所以它看起来不像一个特定的版本。

有没有我可以使用的其他调试器,或者有没有办法让 gdb 更稳定?

最佳答案

Are there any other debuggers I could use



LLDB你可以试试。

is there a way to make gdb more stable?



神奇的“--run-without-bugs”标志;-)

严重的是,GDB 中的任何崩溃都是错误,您应该在 GDB buganizer 中报告它。

如果您不能提供可重现的测试用例,您至少可以在 GDB 下运行 GDB,并找出它崩溃的位置:
gdb -ex 'set prompt (top) ' -ex run --args gdb -ex run /path/to/your/a.out
... your program will crash, you will get (gdb) prompt
(gdb) where
... now GDB will crash, and you will get "outer" GDB (top) prompt
(top) where
... you should get a stack trace for the "inner" GDB crash.

关于ubuntu - gdb本身崩溃时如何调试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55621961/

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