使用 gdb 从核心转储文件中识别完整命令时出现问题\n崩溃的命令本身可能很长
\nIE
\nmyCommand -f log/SlaRunTimeReport.rep -I input/myFile.txt -t output/myFile.txt\nRun Code Online (Sandbox Code Playgroud)\n但是当使用gdb识别位置\xe2\x80\x9c中的命令Core是由\xe2\x80\x9d生成的
\n即通过执行
\ngdb -c core.56536\nRun Code Online (Sandbox Code Playgroud)\n输出:
\nGNU gdb (GDB) Red Hat Enterprise Linux 7.10-20.el7\n\n\xe2\x80\xa6.\n\nCore was generated by `myCommand -f log/SlaRunTimeReport.rep -I \ninput/myFile.t'.\nRun Code Online (Sandbox Code Playgroud)\n可以看到完整的命令(可执行文件+参数)被中间切掉了
\n\xe2\x80\x98myCommand -f log/SlaRunTimeReport.rep -I input/myFile.t'\nRun Code Online (Sandbox Code Playgroud)\n另外使用字符串命令时,也无助于识别完整命令
\nstrings core.56536 | grep PMRunTimeReport\nRun Code Online (Sandbox Code Playgroud)\n输出:
\nmyCommand \n\nmyCommand -f log/SlaRunTimeReport.rep -I input/myFile.t\nRun Code Online (Sandbox Code Playgroud)\n有没有办法从 coredump 文件中获取导致失败的完整命令
\n提前致谢
\n