linuxϵ÷ÊÔÈëÃÅÖ®ÔÝÍ£µÄʹÓÃ
×î½üͨ¶ÁÁËÒ»ÏÂÈí¼þµ÷ÊÔµÄÒÕÊõ£¨The art of debugging with gdb,ddd,eclipse£©£¬×ÜÌåÀ´ËµÊÇÒ»°ãÈëÃż¶µÄµ÷ÊÔÓÃÊé¡£ÎÒ¸öÈ˸оõ¶Ô³õѧgdbµÄÓÐÒ»¶¨µÄ×÷Óã¬ÓÐÀ¢ÓÚÌâÄ¿art¡£ÎÒ¼òµ¥µÄ×ö¸ö×ܽᣬ¹©ÈëÃŲο¼¡£Ö÷Òª½²ÁËgdbµÄ³£ÓÃÃüÁîÒÔ¼°³£¼ûbugµÄµ÷ÊÔ¡£
³£ÓÃÃüÁ
1. ÔÝÍ£»úÖÆ
a.¶ÏµãµÄʹÓÃ
ÉèÖöϵãµÄ·½·¨£ºbreak funtion ÀýÈ磺break main£¬±íʾÔÚmainº¯ÊýÈë¿Ú´¦ÔÝÍ£
break line_num ÀýÈ磺break 5 ±íʾÿµ½µ±Ç°Ô´ÎļþµÚ5ÐÐÔÝÍ£
ÁÙʱ¶Ïµã tbreak 6 £¬±íʾµÚ6ÐÐÔÝÍ£Ò»´Î
»ñÈ¡ËùÓеĶϵãÐÅÏ¢ info breakpoints
ɾ³ý¶Ïµã delete ¶Ïµã±àºÅ
Çå³ý¶Ïµã clear ÒªÇå³ý¶ÏµãËùÔÚÐкÅ
»Ö¸´ÔÝʱʧЧµÄ¶Ïµã enable ¶Ïµã±àºÅ
ʹ¶ÏµãʧЧ disable ¶Ïµã±àºÅ
b.¼ÌÐøµ÷ÊÔ
continue ¼ÌÐøÔËÐУ¬»Ö¸´
step µ¥²½½øÈ룬µ¥²½¸ú×Ù£¬½øÈë¾ßÌ庯Êý
next µ¥²½²»½øÈ룬µ¥²½¸ú×Ù£¬²»½øÈë¾ßÌ庯Êý
Ïà¹ØÎĵµ£º
¹ØÓÚlinuxµÄÎļþȨÏÞ£¬Á˽âһϵļ¸¸öÒªµã¾ÍÐÐÁË£¬Ê×ÏÈlinuxÓÐÓû§×éµÄ¸ÅÄÿ¸öÓû§×éÓ÷ÖÅäÓÐÒ»¸öid,ÓÃÓÚΨһµÄ±êʶ£¬¿ÉÒÔÓÃÓÚ·½±ãÖ¸¶¨´ËÓû§×éÖеÄÓû§²Ù×÷ijЩÎļþµÄȨÏÞ¡£Í¬Ñùÿ¸öÓû§Ò²ÓµÓÐÒ»¸öÓû§id£¬ÓÃÓÚΨһ±êʶÓû§£¬¶ø¶ÔÓÚÿ¸öÎļþÓà ls -l -a ¾Í¿ÉÒÔÏÔʾµ±Ç°Ä¿Â¼ÏÂÃæËùÓеÄÎļþÎļþ¼ÐµÄÏêϸÐÅÏ¢¡£ÀýÈ磺ÎÒÃÇÔ ......
http://inthirties.com:90/thread-1228-1-1.html
Ò»¡¢·ÖÇø·½Ê½
1.´´½¨swap·ÖÇø£¬ÀýÈ磺
# fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-13054, default 1):
Using default value 1
Last cylinder o ......
Linuxϳ£ÓÃѹËõ¸ñʽµÄѹËõÓë½âѹ·½·¨
---------------------------------------------
.tar
´ò°ü£ºtar cvf *.tar *.*(ÔÎļþ»òĿ¼)
½â°ü£ºtar xvf *.tar
---------------------------------------------
.gz
½âѹ1£ºgunzip *.gz
½âѹ2£ºgzip -d *.gz
ѹËõ£ºgzip *.*(ÔÎļþ»òĿ¼)
--------------------------- ......