Twitterä¸ã§ã@alohakun ãè¨åãã¦ãã GDB ã® reverse debugging ã®æ©è½ã使ã£ã¦ã¿ã¾ããã GDB ã«ãã¬ã¼ã¹ã¨éå®è¡æ©è½å ¥ã£ãã®ãã http://www.gnu.org/software/gdb/news/reversible.html http://twitter.com/alohakun/status/4481139191 ã¾ãã¯ç°¡åãªä½¿ãæ¹ã説æãããã¨ã«ãã¤ã³ã¹ãã¼ã«æ¹æ³ã説æãã¾ãã ãããªã¨ãã«ä¾¿å© ãå¤ãªãã¨ããèµ·ãã¦ãã大ä½ã®å ´æãããã£ã¦ããã¨ã ãããã°ä¸ã«ã大ä½ã©ãã§å¤ãªãã¨ãèµ·ãã¦ãããã¯ããã£ã¦ãããã©ãç´°ããå ´æã¯ç¹å®ã§ãã¦ããªãã¨ããreverse debuggingãå¹æãçºæ®ãã¾ãã GDBã§ã¹ãããå®è¡ããã¦ãã¦ãããã¾ã£ã!è¡ãããã!ãã¨ããçµé¨ã¯ããããã¨æãã¾ããããããã¨ããä»ã¾ã§ã¯ããã°ã©ã ã®å®è¡ãæ
ãããããã¬ã¼ã¯ãã¤ã³ãã¨ããæ©è½ã¯ãããã¬ã®æå©ããªãã§ã¯å®ç¾ã§ãã¾ããã ãã¬ã¼ã¯ãã¤ã³ãã¨ã¯ããã°ã©ã ã®å¼·å¶ä¸æåæ¢ãè¡ããã¤ã³ãã§ãå®è¡ä¸ã®ããã°ã©ã ããã¬ã¼ã¯ãã¤ã³ãã«ééããã¨ããã°ã©ã ã¯ä¸æåæ¢ããããããã¬ã«ããããã°ã©ã ã¸ã®ä»å ¥ãè¡ããããã«ãªãã¾ãã ãã¬ã¼ã¯ãã¤ã³ãã¯æ¬¡ã®ãããªå ´æã«è¨å®ã§ãã¾ãã æå®ããè¡çªå·ã®ããã°ã©ã ãå®è¡ãããã¨ããç¬é é¢æ°ãå¼ã³åºããç¬é ãã®ä»ãC++ãªã©ã§ã¯ãä¾å¤ãçºçããç¬éããªã©ã«ããã¬ã¼ã¯ãã¤ã³ããè¨å®ãããã¨ãã§ãã¾ãã è¡çªå·ãã¬ã¼ã¯ ãã¬ã¼ã¯ãã¤ã³ãã¨ãã¦ãã使ç¨ãããã®ã¯ããããã°ã©ã ã®ç¹å®ã®ä½ç½®ãã§ãã ä¾ã¨ãã¦ãbubblesort.cããã°ã©ã ã®sorté¢æ°å ã§ãé£ãåãäºã¤ã®è¦ç´ ãæ¯è¼ãã¦ããç®æã«ãã¬ã¼ã¯ãã¤ã³ããè¨å®ãã¦ã¿ã¾ãã 25|/* bubble sort */ 26|void sort(int *a
Emacs + GDB ãå©ç¨ããããªãã°ãä½ããã GNU Emacs Manual: Debuggersï¼è±èªï¼ ãèªããã¨ãå¼·ããããããã¾ãã å訳ãåå¨ãã¾ããå 容ãå¤ãããã¦ã¹ãå©ç¨ããæä½ãã°ã©ãã£ã«ã«ãªæ©è½ã«ã¤ãã¦ã®è¨è¿°ãããã¾ããã§ããã ããã¥ã¢ã«ãèªãã§ç解ãããã¨ã¯å®è·µã§è¦ãã¦ããããã§ããã以ä¸ã«ã¾ã¨ãããã¼ãã·ã¼ããå©ç¨ããã°æéãç¯ç´ã§ããããããã¾ããã ããã便å©ãªæ©è½ã«é¢ãã¦æ¼ããããã°æ¯éæãã¦ãã ããã .emacs ;;; GDB é¢é£ ;;; æç¨ãªãããã¡ãéãã¢ã¼ã (setq gdb-many-windows t) ;;; å¤æ°ã®ä¸ã«ãã¦ã¹ã«ã¼ã½ã«ãç½®ãã¨å¤ã表示 (add-hook 'gdb-mode-hook '(lambda () (gud-tooltip-mode t))) ;;; I/O ãããã¡ã表示 (setq gdb-use
ããã¤ãã®ãã°ãå«ãããªã¼ã½ã¼ãã®ããã°ã©ã ãç¨æãã¾ããã treesort1.c #include <stdio.h> #include <stdlib.h> struct node { int value; struct node *left; struct node *right; }; void treeadd(struct node**, int); void treewalk(struct node*); void treefree(struct node*); int main(int argc, char **argv) { struct node *rootp; int i; int array[15] = {50, 12, 18, 70, 41, 19, 91, 1, 7, 6, 81, 65, 55, 20, 0}; for (i = 0; i < 15; i++)
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}