0

What is the equivalent of continue in gdb scripts? I tried using loop_continue but it didn't work. Gdb threw error saying undefined command.

I want something like

    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 Answer 1

2

The problem here, surprisingly, is the ;. For me this causes gdb to say:

Undefined command: "loop_continue". Try "help".

However, if I leave out the ;, it works:

(gdb) set $x = 0
(gdb) while $x < 5
 >if $x < 3
  >set $x = 72
  >loop_continue
  >end
 >end
(gdb) print $x
$1 = 72
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.