2016-11-08 129 views
0

在gdb腳本中繼續等效什麼? 我試過使用loop_continue,但沒有奏效。 Gdb拋出錯誤說未定義的命令。gdb腳本重啓繼續while循環

我想是這樣

while $thr 
    if $thr->procedureId != 28 
     set $thr = $thr->cnext 
     loop_continue; // this doesn't work 
    end 
    print $thr 
    set $thr = $thr->cnext 
    end 

回答

1

這裏的問題,令人驚訝的,是;。對我來說,這導致gdb說:

未定義的命令:「loop_continue」。嘗試「幫助」。

但是,如果我離開了;,它的工作原理:

(gdb) set $x = 0 
(gdb) while $x < 5 
>if $x < 3 
    >set $x = 72 
    >loop_continue 
    >end 
>end 
(gdb) print $x 
$1 = 72