`finish` command was not executed when a breakpoint was hit

Viewed 34

Here is part of my gdb script

    break __libc_malloc if $x0==1234
    command 1
          finish
          printf "malloc() = 0x%x\n\n",$x0
          continue
    end

The breakpoint was triggered. But gdb stopped without 'finish' executed. If the 'finish' command was deleted, the breakpoint was trigger with both 'print' and 'continue' excuted. So what was wrong?

0 Answers
Related