Why does gdb implement 'next' command with a series of "vCont;s"?

Daniel Jacobowitz drow@false.org
Mon Jul 30 19:47:00 GMT 2007


On Mon, Jul 30, 2007 at 01:37:33PM +0800, congli wrote:
>  My question is, when I issue the 'next' command, gdb already
>  know the 'step_range_end' is 0x804836f, why not implement the
>  'next' command by set a breakpoint at 0x804836f and then issue
>  "vCont;c"? When the program meet the breakpoint at 0x804836f,
>  we can do a single "vCont;s" to the first instruction of
>  line 7, 0x8048372.

GDB does not know what the instructions between here and there do.
One of them might be a branch or a function call.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list