gdbµ¥³ÌÐòÊÔÏÂÁî gdb½øÈ뺯ÊýÄÚ²¿µ¥³ÌÐòÊÔÏÂÁî
µ¥³ÌÐòÊÔÏÂÁî°üÀ¨£º½øÈ뺯ÊýÄÚ²¿£ºstep£¨Ö´ÐеÚÒ»ÌõÖ¸Á£»next£¨Ìø¹ý³õʼ»¯£©º¯ÊýÄÚ²¿µ÷ÊÔ£ºstep£¨Ö´ÐÐÒ»ÌõÖ¸Á£»next£¨Ìø¹ýº¯ÊýŲÓúÍÑ»·£©£»stepi£¨Ö´Ðлã±àÖ¸Á£»nexti£¨Ìø¹ý»ã±àÖ¸ÁîµÄº¯ÊýŲÓúÍÑ»·£©Éó²é²ÎÊýºÍ¾Ö²¿±äÁ¿£ºp param£¨´òÓ¡²ÎÊýÖµ£©£»p var£¨´òÓ¡¾Ö²¿±äÁ¿Öµ£©ÆäËûÏÂÁfinish£¨Íê³Éº¯ÊýÖ´ÐУ©£»return£¨·µ»ØŲÓú¯Êý£©£»jump£¨ÌøÖÁÖ¸¶¨ÐкŻòº¯Êý£©£»until£¨Ö´ÐÐÖÁÖ¸¶¨ÐкŻòº¯Êý£©£»break£¨ÉèÖöϵ㣩
gdb µ¥³ÌÐòÊÔÏÂÁî
½øÈ뺯ÊýÄÚ²¿
½øÈ뺯ÊýÄÚ²¿¾ÙÐе¥³ÌÐòÊÔ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
- step£º½øÈ뺯Êý£¬²¢Ö´ÐеÚÒ»ÌõÖ¸Áî¡£
- next£º½øÈ뺯Êý£¬²¢Ìø¹ý²ÎÊý±äÁ¿µÄ³õʼ»¯¡£
µ¥³ÌÐòÊÔ
ÔÚº¯ÊýÄÚ²¿¾ÙÐе¥³ÌÐòÊÔ£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
- step£ºÖ´ÐÐÒ»ÌõÖ¸Á²¢½øÈëÏÂÒ»¸öÖ¸Áî¡£
- next£ºÖ´ÐÐÒ»ÌõÖ¸Á²¢Ìø¹ýº¯ÊýŲÓúÍÑ»·¡£
- stepi£ºÖ´ÐÐÒ»Ìõ»ã±àÖ¸Áî¡£
- nexti£ºÖ´ÐÐÒ»Ìõ»ã±àÖ¸Á²¢Ìø¹ýº¯ÊýŲÓúÍÑ»·¡£
Éó²é²ÎÊýºÍ¾Ö²¿±äÁ¿
ÔÚº¯ÊýÄÚ²¿£¬¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÉó²é²ÎÊýºÍ¾Ö²¿±äÁ¿µÄÖµ£º
- p param£º´òÓ¡²ÎÊý param µÄÖµ¡£
- p var£º´òÓ¡¾Ö²¿±äÁ¿ var µÄÖµ¡£
ÆäËûµ¥³ÌÐòÊÔÏÂÁî
- finish£ºÍê³ÉÄ¿½ñº¯ÊýµÄÖ´ÐУ¬²¢·µ»ØŲÓú¯Êý¡£
- return£º·µ»Øµ½Å²Óú¯Êý¡£
- jump£ºÌøµ½Ö¸¶¨µÄÐкŻòº¯Êý¡£
- until£ºÖ´ÐÐÖ¸ÁîÖ±µ½µÖ´ïÖ¸¶¨µÄÐкŻòº¯Êý¡£
- break£ºÔÚÖ¸¶¨µÄÐкŻòº¯Êý´¦ÉèÖöϵ㡣
ÒÔÉϾÍÊÇgdbµ¥³ÌÐòÊÔÏÂÁî gdb½øÈ뺯ÊýÄÚ²¿µ¥³ÌÐòÊÔÏÂÁîµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡