linux´úÂëÆÊÎö¹¤¾ßÓÐÄÄЩ
linux´úÂëÆÊÎö¹¤¾ßÓУº1¡¢gcc£¬ÌṩÁËÇ¿Ê¢µÄ¾²Ì¬ÆÊÎö¹¦Ð§£»2¡¢clang£¬Ìṩ¾²Ì¬ÆÊÎö¹¦Ð§£¬²¢Ö§³ÖÌìÉú±àÒëʱ´úµÄÖÒÑԺ͹ýʧÐÅÏ¢£»3¡¢cppcheck£¬ÓÃÓÚ¼ì²â´úÂëÖеij£¼û¹ýʧ£»4¡¢coverity£¬ÓÃÓÚ·¢Ã÷´úÂëÖеÄDZÔÚȱÏݺÍÇå¾²Îó²î£»5¡¢valgrind£¬Ç¿Ê¢µÄ¶¯Ì¬ÄÚ´æµ÷ÊÔºÍÐÔÄÜÆÊÎö¹¤¾ß£»6¡¢strace£¬ÓÃÓÚ¸ú×ÙÓ¦ÓóÌÐòÓë²Ù×÷ϵͳ֮¼äµÄ½»»¥¡£
±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£
ÔÚLinux¿ª·¢ÖУ¬ÓÐÐí¶à´úÂëÆÊÎö¹¤¾ß¿ÉÓÃÓÚ¾²Ì¬ÆÊÎö¡¢¶¯Ì¬ÆÊÎöºÍÐÔÄÜÆÊÎö¡£ÒÔÏÂÊÇһЩ³£¼ûµÄLinux´úÂëÆÊÎö¹¤¾ß£º
GCC£¨GNU Compiler Collection£©£ºGCCÊÇÒ»Ì×ÆÕ±éʹÓõıàÒëÆ÷ÜöÝÍ£¬ÌṩÁËÇ¿Ê¢µÄ¾²Ì¬ÆÊÎö¹¦Ð§£¬ÀýÈçÖÒÑԺ͹ýʧÌáÐÑ¡¢±àÒëÆ÷ÓÅ»¯µÈ¡£
Clang/LLVM£ºClangÊÇÒ»¸ö¿ªÔ´C/C++/Objective-C±àÒëÆ÷Ç°¶Ë£¬»ùÓÚLLVMÏîÄ¿¡£ËüÌṩÁ˾²Ì¬ÆÊÎö¹¦Ð§£¬²¢Ö§³ÖÌìÉú±àÒëʱ´úµÄÖÒÑԺ͹ýʧÐÅÏ¢¡£
Cppcheck£ºCppcheckÊÇÒ»¸ö¾²Ì¬C/C++´úÂëÆÊÎö¹¤¾ß£¬ÓÃÓÚ¼ì²â´úÂëÖеij£¼û¹ýʧ¡¢Î´½ç˵ÐÐΪºÍ²»Á¼±à³Ìʵ¼ù¡£
Coverity£ºCoverityÊÇÒ»¿îÉÌÒµ¾²Ì¬´úÂëÆÊÎö¹¤¾ß£¬ÓÃÓÚ·¢Ã÷´úÂëÖеÄDZÔÚȱÏݺÍÇå¾²Îó²î¡£
Valgrind£ºValgrindÊÇÒ»¸öÇ¿Ê¢µÄ¶¯Ì¬ÄÚ´æµ÷ÊÔºÍÐÔÄÜÆÊÎö¹¤¾ß¡£Ëü¿ÉÒÔ¼ì²âÄÚ´æ×ß©¡¢»á¼ûÔ½½ç¡¢Î´³õʼ»¯±äÁ¿µÈÎÊÌ⣬²¢ÌṩÐÔÄÜÆÊÎöÄÜÁ¦¡£
strace£ºstraceÊÇÒ»¸öϵͳŲÓøú×Ù¹¤¾ß£¬ÓÃÓÚ¸ú×ÙÓ¦ÓóÌÐòÓë²Ù×÷ϵͳ֮¼äµÄ½»»¥£¬¿ÉÒÔ×ÊÖú¶¨Î»Ó¦ÓóÌÐòÖеÄÎÊÌâ¡£
ÕâÖ»ÊÇһС²¿·Ö³£¼ûµÄLinux´úÂëÆÊÎö¹¤¾ß£¬Æ¾Ö¤ÏêϸÐèÇóºÍÎÊÌ⣬ÉÐÓÐÐí¶àÆäËû¹¤¾ß¿É¹©Ñ¡Ôñ¡£
ÒÔÉϾÍÊÇlinux´úÂëÆÊÎö¹¤¾ßÓÐÄÄЩµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡