public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Infinite loop in sigstep.exp
@ 2004-08-30 12:06 Michael Chastain
  2004-08-30 14:05 ` Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Chastain @ 2004-08-30 12:06 UTC (permalink / raw)
  To: cagney, gdb

I'm getting an infinite loop in the new sigstep.exp
with an old gdb, gdb drow_intercu-20040221-branch.

gdb.log looks like this:

  Breakpoint 2, handler (sig=26) at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/testsuite/gdb.base/sigstep.c:31
  31        done = 1;
  1: x/i $pc  0x8048473 <handler+3>:      movl   $0x1,0x8049738
  (gdb) stepi
  32      } /* handler */
  1: x/i $pc  0x804847d <handler+13>:     mov    %ebp,%esp
  (gdb) stepi
  0x0804847f      32      } /* handler */
  1: x/i $pc  0x804847f <handler+15>:     pop    %ebp
  (gdb) stepi
  0x08048480 in handler (sig=1) at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/testsuite/gdb.base/sigstep.c:32
  32      } /* handler */
  1: x/i $pc  0x8048480 <handler+16>:     ret
  (gdb) stepi

  Breakpoint 2, handler (sig=26) at /berman/fsf/_today_/source/gdb/HEAD/src/gdb/testsuite/gdb.base/sigstep.c:31
  31        done = 1;
  1: x/i $pc  0x8048473 <handler+3>:      movl   $0x1,0x8049738

Somehow, stepi off the "ret" instruction just goes back to the
beginning of the function instead of stepping into "<signal handler
called">.

This blows up my test bed, so I have to fix it.

My first plan is to add some counters to prevent infinite loops
with "exp_continue".  I'm open to other ideas.

Michael

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

* Re: Infinite loop in sigstep.exp
  2004-08-30 12:06 Infinite loop in sigstep.exp Michael Chastain
@ 2004-08-30 14:05 ` Andrew Cagney
  2004-08-30 15:40   ` Michael Chastain
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2004-08-30 14:05 UTC (permalink / raw)
  To: Michael Chastain; +Cc: gdb


> Somehow, stepi off the "ret" instruction just goes back to the
> beginning of the function instead of stepping into "<signal handler
> called">.
> 
> This blows up my test bed, so I have to fix it.
> 
> My first plan is to add some counters to prevent infinite loops
> with "exp_continue".  I'm open to other ideas.

A [k]failing pattern for:

	"Breakpoint .*$gdb_prompt "

would also help.

Andrew


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

* Re: Infinite loop in sigstep.exp
  2004-08-30 14:05 ` Andrew Cagney
@ 2004-08-30 15:40   ` Michael Chastain
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Chastain @ 2004-08-30 15:40 UTC (permalink / raw)
  To: cagney; +Cc: gdb

This change seems to do the job:

  -  exp_continue
  +  exp_continue -continue_timer

"-continue_timer" means that exp_continue does not reset the timeout
counter for "expect".  So after the usual 120 seconds, gdb_test_multiple
busts out with a normal looking timeout FAIL.

I have to check that -continue_timer works with the vintage 1998
"expect" in sourceware.

ac> A [k]failing pattern for:
ac>
ac> 	"Breakpoint .*$gdb_prompt "
ac>
ac> would also help.

Yes, it would.  It would give a nice specific result, but just for this
one case.  If you want to submit a patch for that, go for it.

I'm gonna experiment some more with "-continue_timer" which ought to
break all cases of infinite loops.

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

end of thread, other threads:[~2004-08-30 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-30 12:06 Infinite loop in sigstep.exp Michael Chastain
2004-08-30 14:05 ` Andrew Cagney
2004-08-30 15:40   ` Michael Chastain

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).