Debugging

共 2 篇文章。

fgetc()返回值是int而不是char

• Development

其实是个很简单的常识,居然搞了我半个小时……

fgetc()的返回值是int,因为这个值除了返回拿到的字符之外,还兼作错误标志。由于fgetc()允许文件中包含任意内容,所以只好增大返回值的宽度来表达。

阅读全文… ( 本文约 135 字,阅读大致需要 1 分钟 )

minidump for FreeBSD?

• Kernel

junsu and I have discussed about some big hacks to FreeBSD kernel, and the implementation of a minidump is a good idea, I think.

On Windows there’s a minidump mechanism. The minidump will save ‘crashing’ pages only, while full dump will save the whole core memory when the system going to crash.

阅读全文… ( 本文约 363 字,阅读大致需要 2 分钟 )