public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: break of close loop
@ 2005-11-04  9:15 Efim Monjak
  2005-11-04 14:27 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Efim Monjak @ 2005-11-04  9:15 UTC (permalink / raw)
  To: gdb

Hi,

as I see the step for debugger is not the same as stepi.
After step command debugger try to go to the next source line.
I think it checks for number of source line.
I mean many single steps can be done before an another source
line is recognised. Recognising of an other source line is need
to complete the step command.
After single step command only one single step is done. I don't know
if for an other address is checked or single step responce is enougth
to complete the single step.

The stub recognise the single step complete if the address is changed.
In this case it is not occurs because jump to the same address.
Yes it is possible break a wait by timeout, but it is not really need.
For user is OK if it can stop execution of such loop by ctrl+c

I fixed this by responce Interrupt Signal if Ctrl+c is received.

It seems the debugger don't recognise if it sends ctrl+c and check
only for responce signal. The SIGTRAP after ctrl+c is recognised
as single step is complete but step exeqution will not be stopped.



^ permalink raw reply	[flat|nested] 10+ messages in thread
* break of close loop
@ 2005-11-02 16:41 Efim Monjak
  2005-11-03 21:25 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Efim Monjak @ 2005-11-02 16:41 UTC (permalink / raw)
  To: gdb

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
Packet received: T050B:EC3D0040;0D:E03D0040;0F:D8070040;
Sending packet: $m400007d8,4#94...Ack
Packet received: FEFFFFEA
Sending packet: $m40003de8,4#c5...Ack
Packet received: FEFFFFEA
Sending packet: $meafffffe,4#f6...Ack
Packet received: E01
Sending packet: $m40003de4,4#c1...Ack
Packet received: F03D0040
95                      ;
(gdb) stepi
Sending packet: $s#73...Ack
remote_interrupt called
remote_stop called
Packet received: T050B:EC3D0040;0D:E03D0040;0F:D8070040;
Sending packet: $m400007d8,4#94...Ack
Packet received: FEFFFFEA
Sending packet: $m40003de8,4#c5...Ack
Packet received: FEFFFFEA
Sending packet: $meafffffe,4#f6...Ack
Packet received: E01
Sending packet: $m40003de4,4#c1...Ack
Packet received: F03D0040
95                      ;
(gdb) step
Sending packet: $s#73...Ack
remote_interrupt called
remote_stop called
Packet received: T050B:EC3D0040;0D:E03D0040;0F:D8070040;

[hier loop is stopped]

Sending packet: $s#73...Ack

[hier loop is started by last step]

thanks

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-04 16:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-04  9:15 break of close loop Efim Monjak
2005-11-04 14:27 ` Daniel Jacobowitz
2005-11-04 15:13   ` Dave Korn
2005-11-04 15:19     ` Simon Richter
2005-11-04 15:35       ` Dave Korn
2005-11-04 15:39       ` 'Daniel Jacobowitz'
2005-11-04 15:46         ` Dave Korn
2005-11-04 16:00           ` 'Daniel Jacobowitz'
  -- strict thread matches above, loose matches on Subject: below --
2005-11-02 16:41 Efim Monjak
2005-11-03 21:25 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).