Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux Cµ÷ÊÔÈëÃÅ

1.×Ô¶¨ÒåÊä³ö
  Ïë±Ø´ó¼Ò¶¼ÓÐÀûÓÃÊä³öº¯ÊýÈçprintfÀ´°ïÖúÎÒÃǵ÷ÊÔ³ÌÐòµÄ¾­Àú£¬ÕâÊÇÒ»ÖֱȽÏԭʼµÄ³ÌÐòµ÷ÊÔ¸¨Öú·½·¨£¬ÔÚLinuxÏÂÒ²¿ÉÒÔΪÎÒÃÇËùÓᣲ»¹ýÕâÖÖ·½·¨ÓÐÒ»¸öÃ÷ÏÔµÄȱµã£¬¾ÍÊÇÔÚµ÷ÊÔÍêºóÎÒÃDZØÐë×¢ÊÍ»òɾ³ýµôÕâЩ¸¨Öú´úÂë¡£Linux CÌṩÁË-DDEBUGÕâ¸ö±àÒë±ê¼ÇÀ´¶¨ÒåDEBUGÕâ¸ö·ûºÅ£¬½èÖúÓڸ÷ûºÅ£¬ÎÒÃÇ¿ÉÒÔÔÚÓ¦ÓóÌÐòÖÐÌí¼Ó¶îÍâ´úÂë²¢¸ù¾ÝÐèÒª¾ö¶¨Ö´ÐÐÓë·ñ¡£
  È磺
  #include<stdio.h>
  //*******dtest.c*******
  int main()
  {
    #ifdef DEBUG
      printf("Debug output......\n");
    #endif
    printf("Main function ended!\n";
  }
  ÔËÐУº
  $ cc -o dtest dtest.c
  $ ./dtest
  Main function ended!
  $ rm dtest
  $ cc -o dtest  -DDEBUG dtest.c
  $ ./dtest
   Debug output......
   Main function ended!
  ͨ¹ýÒÔÉÏʾÀý£¬ÄãÓ¦¸ÃÃ÷°×ÁË-DDEBUG±ê¼ÇµÄÓ÷¨ÁË°É£¬ºÇºÇ~~~Ò²ÐíÄã»áÏ룬Èç¹ûÎÒÓкü¸¶Îµ÷ÊÔ´úÂ룬¶øÎÒÏ£Íû¸ù¾ÝÐèҪÿ´ÎÑ¡ÔñÏàÓ¦µÄÒ»¶ÎÀ´ÔËÐУ¬ÕâÊÇ·ñÄÜʵÏÖÄØ£¿²»ÅÂ×ö²»µ½£¬¾ÍÅÂÏë²»µ½¡£ÊÂʵÉÏÎÒÃÇ¿ÉÒÔ·½±ãµÄʵÏÖÕâÖÖ¹¹Ï룬ÈçÏ£º
  #define BASIC_DEBUG 1
  #define EXTRA_DEBUG 2
  #define SUPER_DEBUG 4
  //code 1
  # if (DEBUG & BASIC_DEBUG £©
    printf¡£¡£¡£
  #endif
  //code 2
   # if (DEBUG & EXTRA_DEBUG £©
    printf¡£¡£¡£
  #endif
 
  //code 3
   # if (DEBUG & SUPER_DEBUG £©
    printf¡£¡£¡£
  #endif
  ÉÏÊö´úÂëÖÐÎÒÃÇ×Ô¶¨ÒåÁ˼¸¸öºê±äÁ¿£¬Í¨¹ý"&“À´¾ö¶¨´úÂë¶ÎµÄÖ´ÐÐÓë·ñ¡£ÎÒÃÇÖªµÀ”&“Ϊ°´Î»È¡ÓàÔËËã·û£¬ËùÒÔµ±DEBUGµÄֵΪ1ʱ£¬Ö»ÓÐcode 1»áÖ´ÐУ¬µ±DEBUGµÄֵΪ2ʱ£¬Ö»ÓÐcode 2»áÖ´ÐУ¬¶øµ±DEBUGµÄֵΪ3ʱ£¬code 1ºÍcode 2¶¼»áÖ´ÐУ¬ÒÀ´ÎÀàÍÆ¡£¡£¡£¿ÉÊÇÎÒÃÇÈçºÎ¸ù¾ÝÐèÒªÉèÖÃDEBUGµÄÖµÄØ£¿Õ⻹µÃ¿´-DDEBUG±ê¼Ç£¬ÔÚÃüÁîÌáʾ·ûÏÂÖ±½Ó¸ø-DDEBUG¸³Öµ¾ÍOKÁË£¬Èçcc -o dtest 
-DDEBUG=5  dtest.c
2 µ÷ÊÔ¹¤¾ß(gdb)
  Ç°Ãæ½éÉܵĵ÷ÊÔ·½·¨Ö»ÊÇÒ»ÖÖ°ïÖúÎÒÃǵ÷ÊԵĸ


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

£¨×ªÔØ£©£¨Ö¸Òý×Ô¼º£©Linuxѧϰ·ÉϵÄÌå»á£¨£©


[ת]Õâ¸öÌâÄ¿ºÜ´ó£¬¸øÈËÒ»ÖָоõÎÒºÃÏñºÜ³É¹¦£¬Æäʵ²»È»¡£Êµ¼ÊÉÏ×Ô¼ºË®Æ½²»¸ß£¬ÉõÖÁºÜµÍ£¬µ«ÊÇ×ö¹ýÁËһЩÇúÕÛµÄѧϰµÀ·£¬Í¬Ê±°Ñ×Ô¼ºÕæʵµÄѧϰÀú³Ì±í´ï³öÀ´£¬Ï£Íû¶ÔºóÀ´ÕßÓнè¼øµÄÒâÒ壬ÉõÐÒ£¡
¹¤×÷ÈýÄê¡¢¼¸³É·ÏÈË£¡
ÎÒ2000Äê±ÏÒµÓÚ»ªÖеØÇøµÄÒ»¸öÀí¹¤¿Æ´óѧ£¬×¨ÒµÊÇ»úеµç×Ó£¬ÎÒµ±Ê±ÒѾ­Ç©ÁËÒ»¼ÒÄÚ½ij¸öÊ¡¼¶»ú¹Ø¹¤× ......

¹ØÓÚLinuxÄÚºËѧϰ

³£³£ÓÐÈËÎÊ£ºÎÒÏëѧϰÄںˣ¬ÐèҪʲô»ù´¡Âð£¿Linus Torvalds±¾ÈËÊÇÕâÑù»Ø´ðµÄ£ºÄã±ØÐëʹÓùýLinux¡£ Õâ¸ö¡­¡­»¹ÊÇÓеãÌ«·ºÁË°É£¬ÎÒÏëÏÂÃ漸¸ö»ù´¡¿ÉÄÜ»¹ÊÇÐèÒªµÄ£¬¾¡¹Ü²»Ò»¶¨±ØÐ裺
1, ¹ØÓÚ²Ù×÷ϵͳÀíÂÛµÄ×î³õ¼¶µÄ֪ʶ¡£²»ÐèҪͨ¶Á²¢Àí½â¡¶²Ù×÷ϵͳ¸ÅÄî¡·¡¶ÏÖ´ú²Ù×÷ϵͳ¡·µÈ¾ÞÖø£¬µ«×ÜÒªÖªµÀ·Öʱ£¨time-shared£©ºÍÊ ......

c/c++ °æ¡°¾­µä¡±ÎÊÌâ½â´ð


·¢ÌùÇ°ÇëÏȶÁ£ºc/c++ °æ“¾­µä”ÎÊÌâ½â´ð
C/C++Ò»Ö±¶¼ÊǵØÇòÉÏʹÓÃ×î¹ã·ºµÄ±à³ÌÓïÑÔ£¬¶øÎÒÃǵÄC/C++°æ×ÔÈ»ÈËÆøÒ²²»²î£¬µ«ÊÇÒ»Ö±¶¼ÓÐһЩºÝ³õ¼¶µÄÎÊÌâÌáÁËÓÖÌᣬ²¢²»ÊÇ˵ÕâЩÎÊÌâÈçºÎÈçºÎµÄ²»ºÃ£¬»¹ÊÇÈçºÎÈçºÎµÄÈõÖÇ£¬ÕâЩÎÊÌâÒ»Ö±¶¼ÊÇÐÂÊÖѧϰµÄ»ù´¡£¬ÊDZØÐëÒª¾­¹ýµÄÃż÷£¬ËùÒÔÒ²ÓдæÔڵıØÒª£¬µ«ÊÇÌáµÄ¶àÁË£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ