å°å ¥ iOS éçºè ã®ã¿ãªãããããã«ã¡ã¯ã ãã®ããã°ã§ã¯ä¸»ã«ãã¥ã¼ããªã¢ã«ã ã£ãããã¬ã¼ã ã¯ã¼ã¯ã®ç´¹ä»ã¿ãããªãã¨ãæ¸ãã¦ãã¾ããã ããã§ããã¾ã«ã¯ä¸ç´è åãã®ã¨ã³ããªãæ¸ãã¦ãXcode ããªããªä½¿ã£ã¦ããã·ãã· Objective-C æ¸ãã¦ã¾ãããã¢ãã¼ã«ãã¾ãã iOS éçºãã¯ããã¦ä¸éã Framework ã¯ç解ãããã© Xcode 使ãããªãã¦ãæã足ããªãæ¹ã夢ã«ã¾ã§ EXC_BAD_ACCESS ãåºã¦ããæ¹ã«åèã«ãªãè¨äºã¨ãªãã°ã¨æãã¾ãã ã¨ãã£ã¦ã Xcode ã¯ããã·ã㪠IDE ãªã®ã§ã4ã¤ã®ãããã°ãã¼ã«ã«åãã¦ããããããç¥ããªãã£ãï¼ä¾¿å©ãããï¼ããªæ¹æ³ãç´¹ä»ãã¾ãã ãã¬ã¼ã¯ãã¤ã³ã ãããã°ã«ã¯åã£ã¦ãåããªãé¢ä¿ã§ãããã¢ããªãå®è¡ä¸ã«æå®ããè¡ã§å¦çãä¸æããããããã¹ãããå®è¡ã§ç´°ãããããã°ãå¯è½ã«ãã¦ããã¾ãã ã·ã§ã¼ãã«ãããã¼
Eclipseã®ãStep Intoãã®æåãè¨å®ã«ãã£ã¦å¤æ´ã§ãããã¨ãç¥ã£ã¦ãã¾ãããï¼ ä»åã¯ããStep Intoããå§ãã¨ãããStepå®è¡ãã®æåãå¤æ´ãããStep Filteringãã®è¨å®æ¹æ³ã¨å©ç¨ä¾ãç´¹ä»ãã¾ãã使ãããããã¨æã£ãã人ã¯ããã²å°å ¥ãæ¤è¨ãã¦ã¿ã¦ãã ããã ç®æ¬¡ 1. ãStep Intoãã¨ã¯2. ãããã«æ½ããªãã¦ãããã®ã«ï¼ã3. 解決çï¼Step Filtering3.1. æå¹å3.2. ãã£ã«ã¿è¨å®3.3. ãã®ä»ã®è¨å®4. 使ãæ¹5. è¨å®ä¾ï¼ï¼ã©ãã§ãããæ¨æºã©ã¤ãã©ãªã®ã³ã¼ãã«é£ã°ãªãããã«ãã5.1. åé¡5.2. 対çï¼ç¡è¦ããã¯ã©ã¹ãè¨å®ãã6. è¨å®ä¾ï¼ï¼ClassLoaderã¸ã®Step Intoãåé¿ãã6.1. åé¡6.2. 対çï¼ClassLoaderããã£ã«ã¿ãã7. è¨å®ä¾ï¼ï¼åç´ãªgetter/setterãç¡è¦ã
ãç´ç²é¢æ°åè¨èªã¯ãããã°ãã«ãããã ã£ã¦ç´ç²ãªé¢æ°ã§ printf ãããã°ã§ããªããããã¨ã¤ã¶ããã¦ãã人ãããè¦ããã¾ããããã¾ã§æ¾ç½®ãã¦ãã¾ãããããªãã¤ã¼ãã50ãè¶ ããã®ã§ãHaskellã§ã®ãããã°ã«ã¤ãã¦æ¸ãã¾ãã ä¾å¤å¦çã¨åãããã«ãHaskell ã§ã®ãããã°ã§ã¯ãç´ç²ãªé¢æ°ã¨ IO ãåãã¦èããå¿ è¦ããã¾ãã IO ã§ã® printf ãããã° IO ã§ã¯ãputStrLn ã print ã使ããããåé¡ãªãã§ãããï¼ foo :: Int -> IO Bool foo i = do x <- ããã㦠i putStrLn $ "x = " ++ show x ããã㦠putStrLn "ãããéé" -- ããããã y <- ããããã print y return y ã¡ãªã¿ã«ãforkIO èµ·åãã軽éã¹ã¬ãããã putStrLn ããå ´åã軽éã¹
ã¯ãªã¢ã³ã¼ãã§ã¯Mozilla製åãRubyé¢é£ã®éçºã ãã§ã¯ãªããåºãããªã¼ã½ããã¦ã§ã¢ã®ãµãã¼ãããã¦ãã¾ãããã¡ããããµãã¼ã対象ã®ã½ããã¦ã§ã¢ã®å¤ãã¯ç§éãéçºãããã®ã§ã¯ããã¾ããããããããããã®ã½ããã¦ã§ã¢ã«åé¡ããã£ãå ´åã¯èª¿æ»ããå¿ è¦ã§ããã°ä¿®æ£ãã¦ãã¾ãã ãã®ãããªãµãã¼ããæä¾ã§ããã®ã¯ããã¨ãã¨ãç§éãããªã¼ã½ããã¦ã§ã¢ãå©ç¨ãããéçºããããã¦ããã¨ãã«æ¥å¸¸çã«åé¡ã®èª¿æ»ã»ä¿®æ£ããã¦ããããã§ããã½ããã¦ã§ã¢ãå©ç¨ãã¦ããã¨ãåé¡ã«ééãããã¨ã¯ãããããã¨ã§ãããã®ã½ããã¦ã§ã¢ãããªã¼ã½ããã¦ã§ã¢ã®å ´åã¯ãéçºè ã«åé¡ãå ±åããå¯è½ãªãããããæ·»ãã¾ãããã®ã¨ãããã®ã½ããã¦ã§ã¢ã®å 容ãå®å ¨ã«ææ¡ãã¦ãããã¨ã¯ã»ã¨ãã©ããã¾ãããããããããã§ãä¿®æ£ãããã¨ãã§ãã¾ãã ããã¯ã©ããã¦ã§ããããï¼ä»ã¾ã§ã¯ã©ã®ããã«ãã£ã¦ããã®ããèªåéã§ããã¾ã説æã§ããªãã£
Twitterä¸ã§ã@alohakun ãè¨åãã¦ãã GDB ã® reverse debugging ã®æ©è½ã使ã£ã¦ã¿ã¾ããã GDB ã«ãã¬ã¼ã¹ã¨éå®è¡æ©è½å ¥ã£ãã®ãã http://www.gnu.org/software/gdb/news/reversible.html http://twitter.com/alohakun/status/4481139191 ã¾ãã¯ç°¡åãªä½¿ãæ¹ã説æãããã¨ã«ãã¤ã³ã¹ãã¼ã«æ¹æ³ã説æãã¾ãã ãããªã¨ãã«ä¾¿å© ãå¤ãªãã¨ããèµ·ãã¦ãã大ä½ã®å ´æãããã£ã¦ããã¨ã ãããã°ä¸ã«ã大ä½ã©ãã§å¤ãªãã¨ãèµ·ãã¦ãããã¯ããã£ã¦ãããã©ãç´°ããå ´æã¯ç¹å®ã§ãã¦ããªãã¨ããreverse debuggingãå¹æãçºæ®ãã¾ãã GDBã§ã¹ãããå®è¡ããã¦ãã¦ãããã¾ã£ã!è¡ãããã!ãã¨ããçµé¨ã¯ããããã¨æãã¾ããããããã¨ããä»ã¾ã§ã¯ããã°ã©ã ã®å®è¡ãæ
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}