This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: break of close loop
- From: Daniel Jacobowitz <drow at false dot org>
- To: Efim Monjak <ymonyak at lipowsky dot de>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 3 Nov 2005 16:25:46 -0500
- Subject: Re: break of close loop
- References: <4368EC1E.3000300@lipowsky.de>
On Wed, Nov 02, 2005 at 05:41:02PM +0100, Efim Monjak wrote:
> Hi all,
>
> if it is need to stop in the small loop i.e.:
> for(;;)
> ;
> which is compiled as one opcode:
> lable:
> jmp lable:
>
> GDB works fine by "continue" and "stepi" commands: it sends ctrl+c
> receive the break address and doing no more, but by "step" command
> it try to do a one step after break address is received. The break address
> is the "lable" address and this step starts the loop another time.
>
> Hier is the part of protocol
> (gdb) c
> Continuing.
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> main () at ../src/main.c:95
> 95 ;
> (gdb) c
> Continuing.
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> main () at ../src/main.c:95
> 95 ;
> (gdb) set debug remote 1
> (gdb) stepi
> Sending packet: $s#73...Ack
> remote_interrupt called
> remote_stop called
Why is the step packet not single-stepping the target? Why do you need
to use C-c to stop the target? This is a problem with your stub.
--
Daniel Jacobowitz
CodeSourcery, LLC