C程序中的CoreDump写入文件 [英] CoreDump in C program in writing to file

查看:64
本文介绍了C程序中的CoreDump写入文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个C程序,我正在用字符串写一个文件记录,我得到了coredump。

当我用gdb打开coredump来获取stacktrace时,我收到此错误消息



(内部错误:在psymtab中读取pc 0x4070db,但在symtab中没有。) />


如果有人遇到此问题,请建议。



提前致谢



I have a C program where i am writing a record in string to a file , i am getting coredump.
When i opened coredump with gdb to get stacktrace i get this error message

(Internal error: pc 0x4070db in read in psymtab, but not in symtab.)

Please suggest if someone has faced this issue.

Thanks in advance

推荐答案

这是一个gdb的错误,请参阅这里

当您向文件写入内容时,应检查文件流指针是否为NULL,确保文件路径正确。

如果是是可能的,直接显示您的代码。
This is a gdb''s bug,see more information here.
When you write something to a file,you should check if the file stream pointer is NULL,make sure the file path is correct.
If it is possible, show your code directly.


这篇关于C程序中的CoreDump写入文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆