ÔÚLinuxϲúÉú²¢µ÷ÊÔcoreÎļþ
ÔÚLinuxϲúÉú²¢µ÷ÊÔcoreÎļþ
ÏÈ¿´¿´ÎÒÓõÄÊǸöʲô»úÆ÷£º
$ uname -a
Linux dev 2.4.21-9.30AXsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux
ÔÙ¿´¿´Ä¬ÈϵÄһЩ²ÎÊý£¬×¢Òâcore file sizeÊǸö0£¬³ÌÐò³ö´íʱ²»»á²úÉúcoreÎļþÁË¡£
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 2048
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
д¸ö¼òµ¥µÄ³ÌÐò£¬¿´¿´coreÎļþÊDz»Êǻᱻ²úÉú¡£
$ more foo.c
#include <stdio.h>
static void sub(void);
int main(void)
{
sub();
return 0;
}
static void sub(void)
{
int *p = NULL;
/* derefernce a null pointer, expect core dump. */
printf("%d", *p);
}
$ gcc -Wall -g foo.c
$ ./a.out
Segmentation fault
$ ls -l core.*
ls: core.*: No such file or directory
ûÓÐÕÒµ½coreÎļþ£¬ÎÒÃǸĸÄulimitµÄÉèÖã¬ÈÃËü²úÉú¡£1024ÊÇËæ±ãÈ¡µÄ£¬ÒªÊÇcoreÎļþ´óÓÚ1024¸ö¿é£¬¾Í²úÉú²»³öÀ´ÁË¡£
$ ulimit -c 1024
$ ulimit -a
core file size (blocks, -c) 1024
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 2048
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
$ ./a.out
Segmentation fault (core dumped)
$ ls -l core.*
-rw------- 1 uniware uniware 53248 Jun 30 17:10 core.9128
×¢Òâ¿´ÉÏÊöµÄÊä³öÐÅÏ¢£¬¶àÁ˸ö(core dumped)¡£È·Êµ²úÉúÁËÒ»¸öcoreÎļþ£¬9128ÊǸýø³ÌµÄPID¡£ÎÒÃÇÓÃGDBÀ´¿´¿´Õâ¸öcore¡£
$ gdb --core=core.9128
GNU gdb Asianux (6.0post-0.20040223.17.1AX)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the G
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
µÚ20Õ LinuxÄÚºËÒÆÖ²
Èí¼þÒÆÖ²µÄ¸ÅÄî¼òµ¥µØ˵¾ÍÊÇÈÃÒ»Ì×Èí¼þÔÚÖ¸¶¨µÄÓ²¼þƽ̨ÉÏÕý³£ÔËÐС£ÒÆÖ²ÖÁÉÙ°üÀ¨ÁËÁ½¸ö²»Í¬µÄÓ²¼þ»òÕßÈí¼þƽ̨¡£¶ÔÓÚÓ¦ÓÃÈí¼þÀ´Ëµ£¬ÒÆÖ²Ö÷Òª¿¼ÂDzÙ×÷ϵͳµÄ²îÒ죬ÖصãÔÚÐÞ¸Äϵͳµ÷Óᣱ¾ÕµÄÖصãÊÇLinuxÄÚºËÒÆÖ²£¬ÐèÒª¿¼ÂÇÓ²¼þƽ̨µÄ²îÒ죬Éæ¼°½Ï¶à֪ʶ¡£Ö÷ÒªÄÚÈÝÈçÏ£º
q ......
Ò»¡¢ÒýÑÔ
ÔÚÏÖ´ú²Ù×÷ϵͳÀͬһʱ¼ä¿ÉÄÜÓжà¸öÄÚºËÖ´ÐÐÁ÷ÔÚÖ´ÐУ¬Òò´ËÄÚºËÆäʵÏó¶à½ø³Ì¶àÏ̱߳à³ÌÒ»ÑùÒ²ÐèҪһЩͬ²½»úÖÆÀ´Í¬²½¸÷Ö´Ðе¥Ôª¶Ô¹²ÏíÊý¾ÝµÄ·ÃÎÊ¡£ÓÈÆäÊÇÔڶദÀíÆ÷ϵͳÉÏ£¬¸üÐèҪһЩͬ²½»úÖÆÀ´Í¬²½²»Í¬´¦ÀíÆ÷ÉϵÄÖ´Ðе¥Ôª¶Ô¹²ÏíµÄÊý¾ÝµÄ·ÃÎÊ¡£
ÔÚÖ÷Á÷µÄLinuxÄÚºËÖаüº¬Á˼¸ºõËùÓÐÏÖ´úµÄ²Ù×÷ϵͳ¾ßÓеÄͬ²½» ......
Ç° ÑÔ
“Linux£¿Ëü±ÈWindows¸üºÃÂð£¿ÎÒÄÜÓÃËü´òħÊÞÂ𣿔
“¿È£¡±ðÌáÁË£¬Ëü²Ù×÷ÆðÀ´ÌرðÂé·³£¬ÄãµÃ²»Í£µØÇû÷¼üÅÌ¡£Ã»×¼Ëü»¹»á³ÃÄã²»×¢ÒâµÄʱºòÔÚÄãµÄÊÖָͷÉÏÒ§Ò»¿ÚÄØ£¡”
»òÐíÄãÒ²ÓÐÀàËƵÄÏë·¨¡£µ«ÎÞÂÛÈËÃǶÔLinuxÓÐÔõÑùµÄÎó½â£¬ÖÁÉÙÎÒ²»ÔÙÏñǰЩÄêÄÇÑùƵ·±µØ»Ø´ð“Linux ......
1.4 InternetÉϵÄLinux×ÊÔ´
InternetÉÏÓÀÔ¶¶¼²»È±ÉÙLinux×ÊÔ´£¬³ýÁË1.3.1½ÚÁгöµÄ¸÷·¢ÐаæµÄ¹Ù·½ÍøÕ¾Í⣬»¹Óкܶà×éÖ¯ºÍ¸öÈ˽¨Á¢Á˸÷ÖÖLinuxÍøÕ¾ºÍÂÛ̳£¬ÕâЩ×ÊԴΪLinuxÓû§ÌṩÁË´óÁ¿Ö§³Ö¡£¾³£¹â¹ËÕâЩµØ·½²¢¼°Ê±Êµ¼ùÊÇѧϰLinuxµÄ×îºÃ;¾¶¡£±í1.2ºÍ±í1.3·Ö±ðÁгöÁ˹úÍâºÍ¹úÄڵij£ÓÃLinuxÕ¾µã¡£
±í1.2 ³£Ó ......