如何从目标代码、DDB backtrace找到崩溃的原因
今天复习了一次……
第一,你需要源代码编译出来的包含调试符号的目标代码。
第二,backtrace中的内容要尽可能完整。
共 127 篇文章。
今天复习了一次……
第一,你需要源代码编译出来的包含调试符号的目标代码。
第二,backtrace中的内容要尽可能完整。
假定你使用的是FreeBSD
With the work from intron@ now we have the Chinese Project’s translations in PDF format!
You may have noticed that FreeBSD by default does not allow many programs to play sound at same time. For instance, you generally can not hear GAIM sound when you are hearing MP3.
Fortunately, this can be resolved if you have read the documentations. Now I write here so you can also Google it :-)
Add a single line into /etc/sysctl.conf:
hw.snd.pcm0.vchans=16
Then, reboot (or if you are careful enough, shut down all programs that is using sound subsystem, then run /etc/rc.d/sysctl restart)
Today Giorgos Keramidas (keramida@) has noted that the following skill that can minimize lock period:
所以我今天一鼓作气搞到了5.9。还有8个section,余下的loader估计基本上会搞定。
现在可以通过 这里 访问最新的快照。如果有问题记得跟我联系。
Sometimes, when you are in a NAT’ed environment, ssh connection may be dropped when the gateway is busy.
OpenSSH has provided a solution against this.
The option is called “ClientAliveInterval”. With this setting in your sshd_config, sshd(8) would send a ping message through the encrypted channel periodically, thus prevent the early drop.
The default setting is 15, meaning the ping period is 15 seconds.
I have an idea: let we have “a” is the number to determine.
return ( (0 == (a & (a-1))) && (a > 0))
Despite the style of the code, is there some better solution? Note that a is a native integer type (say, int, long, long long, etc).
Today I have experienced how to install FreeBSD from a USB device - quite simple so you can do it yourself :-)
First, initialize the USB solid state disk with bsdlabel(8):
bsdlabel -wB /dev/da0
Then, initialize a file system:
newfs -O1 /dev/da0a
Third, copy CDROM’s /boot to it.
And you can now boot from the USB disk.
It’s not quite easy to represent a type that is found in base “template class”. Consider the following code:
template <class Key,class T> class CMyClass: public map<Key,T>{public: void lookup(Key x) { map<Key,T>::iterator iter; iter = find(x); }};