gdb 不读取 macOS 上的核心转储
gdb doesn't read the core dump on macOS
我已经在 OSX 10.10.5 上安装了来自 Homebrew 的 gdb 公式来向 weechat 的开发者发送回溯(因为 weechat 每次安装 Homebrew 都会崩溃 /exit
).
尝试读取核心文件时遇到这个问题:
gdb /usr/local/bin/weechat /cores/core.70087
GNU gdb (GDB) 7.10
Copyright (C) 2015 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-darwin14.5.0".
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"...
Reading symbols from /usr/local/bin/weechat...(no debugging symbols found)...done.
"/cores/core.70087": no core file handler recognizes format
(gdb)
我尝试使用 lldb
而不是 gdb
:
$ lldb /usr/local/bin/weechat /cores/core.70087
(lldb) target create "/usr/local/bin/weechat"
Current executable set to '/usr/local/bin/weechat' (x86_64).
(lldb) settings set -- target.run-args "/cores/core.70087"
(lldb) bt full
error: bt [<digit>|all]
(lldb) bt all
error: invalid process
(lldb) bt
error: invalid process
(lldb) thread backtrace
error: invalid process
(lldb)
不知道我在做什么,只是尽我所能来解决这些崩溃问题。
您应该能够启动 lldb 作为
$ lldb --core "/cores/core.70087"
我已经在 OSX 10.10.5 上安装了来自 Homebrew 的 gdb 公式来向 weechat 的开发者发送回溯(因为 weechat 每次安装 Homebrew 都会崩溃 /exit
).
尝试读取核心文件时遇到这个问题:
gdb /usr/local/bin/weechat /cores/core.70087
GNU gdb (GDB) 7.10
Copyright (C) 2015 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-darwin14.5.0".
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"...
Reading symbols from /usr/local/bin/weechat...(no debugging symbols found)...done.
"/cores/core.70087": no core file handler recognizes format
(gdb)
我尝试使用 lldb
而不是 gdb
:
$ lldb /usr/local/bin/weechat /cores/core.70087
(lldb) target create "/usr/local/bin/weechat"
Current executable set to '/usr/local/bin/weechat' (x86_64).
(lldb) settings set -- target.run-args "/cores/core.70087"
(lldb) bt full
error: bt [<digit>|all]
(lldb) bt all
error: invalid process
(lldb) bt
error: invalid process
(lldb) thread backtrace
error: invalid process
(lldb)
不知道我在做什么,只是尽我所能来解决这些崩溃问题。
您应该能够启动 lldb 作为
$ lldb --core "/cores/core.70087"