This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Why does gdb implement 'next' command with a series of "vCont;s"?
- From: Daniel Jacobowitz <drow at false dot org>
- To: congli <congli dot cn at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 30 Jul 2007 07:43:03 -0400
- Subject: Re: Why does gdb implement 'next' command with a series of "vCont;s"?
- References: <4414a3a80707292237l543b1b03w5cc2d5d93fe44a47@mail.gmail.com>
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