【问题标题】:How to install php debug symbols on Debian Buster?如何在 Debian Buster 上安装 php 调试符号?
【发布时间】:2020-08-12 07:06:15
【问题描述】:

我正在尝试为 Debian Buster 中的 php-fpm 上发生的一些分段错误获取有意义的回溯。 看了Debian's guide,我明白了

  1. 我需要添加调试仓库deb http://deb.debian.org/debian-debug/ buster-debug main
  2. 我需要安装debian-goodies 以便我可以使用find-dbgsym-packages 搜索我的调试符号包

但似乎find-dbgsym-packages /usr/bin/php 的输出中缺少 php 调试符号,这些是列出的包:

  • libargon2-1-dbgsym
  • libgcc1-dbg
  • libicu63-dbgsym
  • liblzma5-dbgsym
  • libpcre2-dbg
  • libsodium23-dbgsym
  • libssl1.1-dbgsym
  • libstdc++6-8-dbg
  • libxml2-dbg
  • php7.3-cli-dbgsym
  • zlib1g-dbg

我期待找到像 php7.3-dbgsym 这样的包...我错过了什么?

【问题讨论】:

标签: php coredump debug-symbols debian-buster


【解决方案1】:

我期待找到一个像 php7.3-dbgsym 这样的包......我错过了什么?

您缺少php7.3-cli-dbgsym 中包含的调试符号。

安装 find-dbgsym-packages 找到的所有软件包,并再次分析您的 core

【讨论】:

  • 我听从了你的建议,但 gdb bt 看起来和没有安装调试符号一样(很多 ?? 调用)。
【解决方案2】:

现在好像可以加个自动下载器了:

https://wiki.debian.org/HowToGetABacktrace#Automatically_loading_debugging_symbol_from_the_Internet

只需在控制台中输入:

export DEBUGINFOD_URLS="https://debuginfod.debian.net"

然后运行你的 PHP 脚本:

$ gdb -args /usr/bin/php my_faulty_script.php
(gdb) run
...
(wait for the crash)
...
(gdb) bt

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-09
    • 1970-01-01
    相关资源
    最近更新 更多