* mi-until.exp failures
@ 2006-03-03 15:31 Paul Brook
2006-03-30 9:49 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2006-03-03 15:31 UTC (permalink / raw)
To: gdb-patches
I'm seeing the following failures on arm-none-eabi with a gcc4.x compiler:
FAIL: gdb.mi/mi-until.exp: until after while loop (timeout)
FAIL: gdb.mi/mi2-until.exp: until after while loop (timeout)
Turns out that this the "until" command actuig in unexpected ways, as
described in this thread:
http://sources.redhat.com/ml/gdb/2005-02/msg00151.html
AFAICS there's not been any real consensus whether this is a bug or a feature.
I've had a quick look at making the command work purely on source lines,
and concluded I don't have the time/inclination to make it work. I just want
to squish the unexpected testsuite failure.
I've created two patches to that end:
a) Decide this is a feature. Tweak the testcase to allow the strange behavior
and pass.
b) Decide this is a bug. I will file a bug and kfail the testcase.
Ok? PASS or KFAIL?
Paul
2006-03-03 Paul Brook <paul@codesourcery.com>
* gdb.mi/mi-until.exp: Allow until command stopping at top of loop.
* gdb.mi/mi2-until.exp: Ditto.
Index: testsuite/gdb.mi/mi-until.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-until.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi-until.exp
--- testsuite/gdb.mi/mi-until.exp 18 May 2005 03:41:59 -0000 1.9
+++ testsuite/gdb.mi/mi-until.exp 3 Mar 2006 14:44:38 -0000
@@ -78,7 +78,7 @@ proc test_until {} {
send_gdb "111-exec-until\n"
gdb_expect {
- -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
+ -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"(12|9)\"\}\r\n$mi_gdb_prompt$" {
pass "until after while loop"
}
timeout {
Index: testsuite/gdb.mi/mi2-until.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-until.exp,v
retrieving revision 1.3
diff -u -p -r1.3 mi2-until.exp
--- testsuite/gdb.mi/mi2-until.exp 18 May 2005 03:41:59 -0000 1.3
+++ testsuite/gdb.mi/mi2-until.exp 3 Mar 2006 14:44:38 -0000
@@ -79,7 +79,7 @@ proc test_until {} {
send_gdb "111-exec-until\n"
gdb_expect {
- -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
+ -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"(12|9)\"\}\r\n$mi_gdb_prompt$" {
pass "until after while loop"
}
timeout {
2006-03-03 Paul Brook <paul@codesourcery.com>
* gdb.mi/mi-until.exp: kfail broken until command.
* gdb.mi/mi2-until.exp: Ditto.
Index: gdb/testsuite/gdb.mi/mi-until.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-until.exp,v
retrieving revision 1.9
diff -u -p -r1.9 mi-until.exp
--- gdb/testsuite/gdb.mi/mi-until.exp 18 May 2005 03:41:59 -0000 1.9
+++ gdb/testsuite/gdb.mi/mi-until.exp 3 Mar 2006 14:48:00 -0000
@@ -81,6 +81,9 @@ proc test_until {} {
-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
pass "until after while loop"
}
+ -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"9\"\}\r\n$mi_gdb_prompt$" {
+ kfail gdb/xxx "until after while loop (went backwards)"
+ }
timeout {
fail "until after while loop (timeout)"
}
Index: gdb/testsuite/gdb.mi/mi2-until.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-until.exp,v
retrieving revision 1.3
diff -u -p -r1.3 mi2-until.exp
--- gdb/testsuite/gdb.mi/mi2-until.exp 18 May 2005 03:41:59 -0000 1.3
+++ gdb/testsuite/gdb.mi/mi2-until.exp 3 Mar 2006 14:48:00 -0000
@@ -82,6 +82,9 @@ proc test_until {} {
-re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"12\"\}\r\n$mi_gdb_prompt$" {
pass "until after while loop"
}
+ -re "111\\^running\r\n${mi_gdb_prompt}111\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"9\"\}\r\n$mi_gdb_prompt$" {
+ kfail gdb/xxx "until after while loop (went backwards)"
+ }
timeout {
fail "until after while loop (timeout)"
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mi-until.exp failures
2006-03-03 15:31 mi-until.exp failures Paul Brook
@ 2006-03-30 9:49 ` Daniel Jacobowitz
2006-03-30 16:34 ` Paul Brook
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-03-30 9:49 UTC (permalink / raw)
To: Paul Brook; +Cc: gdb-patches
On Fri, Mar 03, 2006 at 03:03:50PM +0000, Paul Brook wrote:
> I'm seeing the following failures on arm-none-eabi with a gcc4.x compiler:
>
> FAIL: gdb.mi/mi-until.exp: until after while loop (timeout)
> FAIL: gdb.mi/mi2-until.exp: until after while loop (timeout)
>
> Turns out that this the "until" command actuig in unexpected ways, as
> described in this thread:
> http://sources.redhat.com/ml/gdb/2005-02/msg00151.html
>
> AFAICS there's not been any real consensus whether this is a bug or a feature.
> I've had a quick look at making the command work purely on source lines,
> and concluded I don't have the time/inclination to make it work. I just want
> to squish the unexpected testsuite failure.
I see that I never responded to Eli last February; lo and behold, it's
two of the 528 new messages in my gdb@ folder. Shame on me.
I just went through until_next_command and next_command/step_1 line by
line. The current implementation of until_next_command is similar to
"next", except that the stepping range is from the start of the
function to the current PC; so it is clearly "step until a higher PC"
[I had to look a couple of times to figure out how it worked]. It's
been that way since before the dawn of recorded cvs annotate.
Here's what the documentation actually says:
Continue running until a source line past the current line, in the
current stack frame, is reached. This command is used to avoid
single stepping through a loop more than once. It is like the
`next' command, except that when `until' encounters a jump, it
automatically continues execution until the program counter is
greater than the address of the jump.
This means that when you reach the end of a loop after single
stepping though it, `until' makes your program continue execution
until it exits the loop. In contrast, a `next' command at the end
of a loop simply steps back to the beginning of the loop, which
forces you to step through the next iteration.
The first two sentences agree with the testcase. The next sentence
describes what is actually implemented. The second paragraph concludes
that the two are equivalent. This was clearly the case in a previous
generation of compilers, but it isn't any more.
So:
> b) Decide this is a bug. I will file a bug and kfail the testcase.
>
> Ok? PASS or KFAIL?
> 2006-03-03 Paul Brook <paul@codesourcery.com>
>
> * gdb.mi/mi-until.exp: kfail broken until command.
> * gdb.mi/mi2-until.exp: Ditto.
I'll approve this one. It's actually in the test_until function, by
the way.
It's a bug; it would be nice if someone fixed it, but infrun may need
some care and attention first.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mi-until.exp failures
2006-03-30 9:49 ` Daniel Jacobowitz
@ 2006-03-30 16:34 ` Paul Brook
0 siblings, 0 replies; 3+ messages in thread
From: Paul Brook @ 2006-03-30 16:34 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> > b) Decide this is a bug. I will file a bug and kfail the testcase.
> >
> > Ok? PASS or KFAIL?
> >
> > 2006-03-03 Paul Brook <paul@codesourcery.com>
> >
> > * gdb.mi/mi-until.exp: kfail broken until command.
> > * gdb.mi/mi2-until.exp: Ditto.
>
> I'll approve this one. It's actually in the test_until function, by
> the way.
Done.
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-30 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-03 15:31 mi-until.exp failures Paul Brook
2006-03-30 9:49 ` Daniel Jacobowitz
2006-03-30 16:34 ` Paul Brook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox