gpt4 book ai didi

c - 使用带有核心文件的 gdb 进行调试时输出消息不清晰

转载 作者:太空宇宙 更新时间:2023-11-03 23:28:29 25 4
gpt4 key购买 nike

我在 ubuntu 12.04 上使用 gdb 调试我的 c 代码,下面是命令:

msz@ubuntu:~$ gdb m core

运行上述命令后,我得到以下消息:

warning: Can't read pathname for load map: Input/output error.

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff8cdfe000
Core was generated by `./m'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000400962 in matmultunopt ()

这两个警告是什么意思?从最后一行可以得出什么结论,即

#0  0x0000000000400962 in matmultunopt ()

当然,它给出了一些提示,表明 matmultunopt() 中存在一些问题,但是什么是:

#0  0x0000000000400962

警告实际上告诉我什么?

更新

现在我使用 -g 执行此操作并收到以下消息:

warning: Can't read pathname for load map: Input/output error.

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fffde2c8000
Core was generated by `./m'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000400962 in matmultunopt (matrix1=0x3, matrix2=0xd7d030,
resultant=0xd7d050, rows1=2, colmns1=2, rows2=2, colmns2=2)
at mattmgpuf1.c:115
115 { double a = matrix1[i*rows2 + k];

仍然,我无法理解给定行的含义:

 #0  0x0000000000400962 in matmultunopt (matrix1=0x3, matrix2=0xd7d030, 
resultant=0xd7d050, rows1=2, colmns1=2, rows2=2, colmns2=2)

最佳答案

调试器的输出解释:

#0  0x0000000000400962 in matmultunopt (matrix1=0x3, matrix2=0xd7d030, resultant=0xd7d050, rows1=2, colmns1=2, rows2=2, colmns2=2) at mattmgpuf1.c:115
^^ ^----------------^ ^----------^ ^---------------------------------------------------------------------------------------^ ^--------------^
| | | | |
| | | | +-- source file name and line where the program stopped
| | | +-- current function's parameters and their values
| | +-- current function
| +-- program address
+-- stack/call level

关于c - 使用带有核心文件的 gdb 进行调试时输出消息不清晰,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20989694/

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