This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: break of close loop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]