linuxÏÂgdbµ¥²½µ÷ÊÔ
GDB ¸ÅÊö
————
GDB ÊÇ GNU ¿ªÔ´×éÖ¯·¢²¼µÄÒ»¸öÇ¿´óµÄ UNIX ϵijÌÐòµ÷ÊÔ¹¤¾ß¡£»òÐí£¬¸÷λ±È½Ïϲ»¶ÄÇÖÖͼÐνçÃ淽ʽµÄ£¬Ïñ VC ¡¢ BCB µÈ IDE µÄµ÷ÊÔ£¬µ«Èç¹ûÄãÊÇÔÚ UNIX ƽ̨ÏÂ×öÈí¼þ£¬Äã»á·¢ÏÖ GDB Õâ¸öµ÷ÊÔ¹¤¾ßÓÐ±È VC ¡¢ BCB µÄͼÐλ¯µ÷ÊÔÆ÷¸üÇ¿´óµÄ¹¦ÄÜ¡£Ëùν “ ´çÓÐËù³¤£¬³ßÓÐËù¶Ì ” ¾ÍÊÇÕâ¸öµÀÀí¡£
Ò»°ãÀ´Ëµ£¬ GDB Ö÷Òª°ïæÄãÍê³ÉÏÂÃæËĸö·½ÃæµÄ¹¦ÄÜ£º
1 ¡¢Æô¶¯ÄãµÄ³ÌÐò£¬¿ÉÒÔ°´ÕÕÄãµÄ×Ô¶¨ÒåµÄÒªÇóËæÐÄËùÓûµÄÔËÐгÌÐò¡£
2 ¡¢¿ÉÈñ»µ÷ÊԵijÌÐòÔÚÄãËùÖ¸¶¨µÄµ÷ÖõĶϵ㴦ͣס¡££¨¶Ïµã¿ÉÒÔÊÇÌõ¼þ±í´ïʽ£©
3 ¡¢µ±³ÌÐò±»Í£×¡Ê±£¬¿ÉÒÔ¼ì²é´ËʱÄãµÄ³ÌÐòÖÐËù·¢ÉúµÄÊ¡£
4 ¡¢¶¯Ì¬µÄ¸Ä±äÄã³ÌÐòµÄÖ´Ðл·¾³¡£
´ÓÉÏÃæ¿´À´£¬ GDB ºÍÒ»°ãµÄµ÷ÊÔ¹¤¾ßûÓÐʲôÁ½Ñù£¬»ù±¾ÉÏÒ²ÊÇÍê³ÉÕâЩ¹¦ÄÜ£¬²»¹ýÔÚϸ½ÚÉÏ£¬Äã»á·¢ÏÖ GDB Õâ¸öµ÷ÊÔ¹¤¾ßµÄÇ¿´ó£¬´ó¼Ò¿ÉÄܱȽÏÏ°¹ßÁËͼÐλ¯µÄµ÷ÊÔ¹¤¾ß£¬µ«ÓÐʱºò£¬ÃüÁîÐеĵ÷ÊÔ¹¤¾ßÈ´ÓÐ×ÅͼÐλ¯¹¤¾ßËù²»ÄÜÍê³ÉµÄ¹¦ÄÜ¡£ÈÃÎÒÃÇÒ»Ò»¿´À´¡£
Ò»¸öµ÷ÊÔʾÀý
——————
Ô´³ÌÐò£º tst.c
1 #include <stdio.h>
2
3 int func(int n)
4 {
5 int sum=0,i;
6 for(i=0; i<n; i++)
7 {
8 sum+=i;
9 }
10 return sum;
11 }
12
13
14 main()
15 {
16 int i;
17 long result = 0;
 
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ê×ÏÈÊÇ°²×°
sudo apt-get install sysv-rc-conf
È»ºóÔÚÖÕ¶Ë sudo sysv-rc-conf
ÔÚÕâ¸öÈí¼þÀ¿ÉÒÔÓüüÅ̵ķ½Ïò¼üÒƶ¯£¬ÓÿոñÑ¡È¡£¬Ò²¿ÉÒÔÖ±½ÓÓÃÊó±êÑ¡È¡£¬×îºóÓÃq±£´æÍ˳ö£¬Ò»ÏÂÁгö·þÎñµÄÃû³ÆºÍ»ù±¾µÄ½âÊÍ¡£
´úÂë:
acpi-suppÕâ¸öÊǹØÓÚµçÔ´Ö§³ÖµÄĬÈÏÊÇ1,2,3,4,5ÏÂÆô¶¯£¬ÎÒÈÏΪÄã¿ÉÒÔ°ÑËüµ÷Õûµ½s¼¶±ð¡£
acpid acp ......
·þÎñÆ÷ͻȻ³öÏÖ¹«ÍøÍøÂ粻ͨ¡£»¹ºÃÓÐÅäÁ½¸öIP£¬Ò»¹«Íø£¬Ò»ÄÚÍø£¬ÄÚÍø¿Éͨ£¬Í¨¹ýÄÚÍøÁ¬½Óµ½·þÎñÆ÷ÉÏ ¡£²é¿´ÈÕÖ¾£¬dmesg£¬·¢ÏÖÓÐÕâÑùÒ»Ìõ£º
Sep 9 14:34:36 slave kernel: NETDEV WATCHDOG: eth0: transmit timed out
/etc/init.d/network restart ÍøÂç·þÎñÖØÆôһϣ¬»Ö¸´Õý³£¡£
µ½google²éÕÒ×ÊÁÏ£¬·¢ÏÖÒ²ÓÐÒ»ÑùµÄÎÊ ......
½ñÌìºöÈ»·¢ÏÖ´úÀí·þÎñÆ÷²»ÄÜʹÓÃÁË£¬ÉÏÈ¥Ò»¿´£¬squidµÄ¶Ë¿Ú¼àÌýStopµôÁË£¬²é¿´ÈÕÖ¾£¬ÈçÏ´íÎó ¡¡¡¡½ñÌìºöÈ»·¢ÏÖ´úÀí·þÎñÆ÷²»ÄÜʹÓÃÁË£¬ÉÏÈ¥Ò»¿´£¬squidµÄ¶Ë¿Ú¼àÌýStopµôÁË£¬²é¿´ÈÕÖ¾£¬ÈçÏ´íÎó
¡¡¡¡localhost kernel: Out of Memory: Killed process 785 (squid).
¡¡¡¡ÍøÉÏgoogleһͨ£¬Ã»ÓÐÈκÎÓмÛÖµµÄ½á¹û£¬×Ô¼ºÕÒÆäË ......