* Re: [RFA] Fix for gdb-gnats bug #14
@ 2001-02-18 15:57 Michael Elizabeth Chastain
0 siblings, 0 replies; 9+ messages in thread
From: Michael Elizabeth Chastain @ 2001-02-18 15:57 UTC (permalink / raw)
To: chastain, msnyder; +Cc: gdb-patches, jmoore
Hi Michael,
> No. Trust me -- it never did. This would require infrastructure
> that has never existed, and would require code to be reentrant which
> has always relied on global variables.
OK, that part of my speculation is wrong.
So it looks like the original author of commands.exp suffered from the
same error. The original author probably thought gdb was broken, but
actually the test case was broken at birth.
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Fix for gdb-gnats bug #14
@ 2001-02-16 17:54 Michael Elizabeth Chastain
0 siblings, 0 replies; 9+ messages in thread
From: Michael Elizabeth Chastain @ 2001-02-16 17:54 UTC (permalink / raw)
To: chastain, msnyder; +Cc: gdb-patches, jmoore
Hi Michael,
> Correct. In fact, this test has always been wrong, and AFAIK,
> it could never ever ever have passed. I don't understand how
> it has existed as such.
My guess is that gdb used to run all the commands in a command list,
including all the commands after "next" and "step".
Then someone wrote the test to expect that behaviour.
Then someone noticed that gdb was having trouble and changed gdb and
also updated the manual. The prose in the manual gives me a feeling of
"this section got added in response to a bug".
I'd have to go way back into old archives to check out that theory.
> I don't understand why it isn't a FAIL on RH7. The output is
> identical to the failing output on Solaris.
Ah. It _is_ a FAIL on RH 7.
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Fix for gdb-gnats bug #14
@ 2001-02-16 17:19 Michael Elizabeth Chastain
2001-02-16 17:36 ` Michael Snyder
0 siblings, 1 reply; 9+ messages in thread
From: Michael Elizabeth Chastain @ 2001-02-16 17:19 UTC (permalink / raw)
To: chastain, jmoore; +Cc: gdb-patches
Hi John,
As I understand it, HP and Cygnus did a lot of gdb development on a branch
and then contributed big blocks of it back to the FSF code base. I wasn't
around at the time, so maybe somebody who was can comment on the history.
This looks like someone was merging an HP chunk and saw that it was
different from the baseline. So they took the HP version and wrapped
it in a test for 'istarget "hppa*-hp-hpux*"' test.
But the hpux version is right (for all platforms) and the non-hpux
version is wrong (for all platforms).
> (and besides, I didn't have an hpux to try it out on).
I don't have access to an hpux at the moment either. :( But I do have
recent log files from a Red Hat project. Here are excerpts:
# hppa1.1-hp-hpux10.20 native
(gdb) PASS: gdb.base/commands.exp: commands in infrun_breakpoint_command_test #2
continue^M
Continuing.^M
^M
Breakpoint 7, factorial (value=5) at ***/run.c:77^M
77 if (value > 1) {^M
78 value *= factorial (value - 1);^M
(gdb) PASS: gdb.base/commands.exp: continue in infrun_breakpoint_command_test
# solaris 2.6 native
(gdb) PASS: gdb.base/commands.exp: commands in infrun_breakpoint_command_test #2
continue^M
Continuing.^M
^M
Breakpoint 7, factorial (value=5) at ***/run.c:77^M
77 if (value > 1) {^M
78 value *= factorial (value - 1);^M
(gdb) FAIL: gdb.base/commands.exp: continue in infrun_breakpoint_command_test
> I see no big deal (do more work) to eliminate the hpux exception.
That would be great. If my archeological theory is right, you would be
resolving a merge item that never got completely merged.
Michael
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFA] Fix for gdb-gnats bug #14
2001-02-16 17:19 Michael Elizabeth Chastain
@ 2001-02-16 17:36 ` Michael Snyder
0 siblings, 0 replies; 9+ messages in thread
From: Michael Snyder @ 2001-02-16 17:36 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: jmoore, gdb-patches
Michael Elizabeth Chastain wrote:
>
> Hi John,
>
> As I understand it, HP and Cygnus did a lot of gdb development on a branch
> and then contributed big blocks of it back to the FSF code base. I wasn't
> around at the time, so maybe somebody who was can comment on the history.
Close enough. HP did the work separately, Cygnus attempted to merge it.
> This looks like someone was merging an HP chunk and saw that it was
> different from the baseline. So they took the HP version and wrapped
> it in a test for 'istarget "hppa*-hp-hpux*"' test.
Probably right.
> But the hpux version is right (for all platforms) and the non-hpux
> version is wrong (for all platforms).
Correct. In fact, this test has always been wrong, and AFAIK,
it could never ever ever have passed. I don't understand how
it has existed as such.
> > (and besides, I didn't have an hpux to try it out on).
>
> I don't have access to an hpux at the moment either. :( But I do have
> recent log files from a Red Hat project. Here are excerpts:
>
> # hppa1.1-hp-hpux10.20 native
> (gdb) PASS: gdb.base/commands.exp: commands in infrun_breakpoint_command_test #2
> continue^M
> Continuing.^M
> ^M
> Breakpoint 7, factorial (value=5) at ***/run.c:77^M
> 77 if (value > 1) {^M
> 78 value *= factorial (value - 1);^M
> (gdb) PASS: gdb.base/commands.exp: continue in infrun_breakpoint_command_test
>
> # solaris 2.6 native
> (gdb) PASS: gdb.base/commands.exp: commands in infrun_breakpoint_command_test #2
> continue^M
> Continuing.^M
> ^M
> Breakpoint 7, factorial (value=5) at ***/run.c:77^M
> 77 if (value > 1) {^M
> 78 value *= factorial (value - 1);^M
> (gdb) FAIL: gdb.base/commands.exp: continue in infrun_breakpoint_command_test
>
> > I see no big deal (do more work) to eliminate the hpux exception.
>
> That would be great. If my archeological theory is right, you would be
> resolving a merge item that never got completely merged.
I don't understand why it isn't a FAIL on RH7. The output is
identical to the failing output on Solaris.
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <200102170027.QAA01551@bosch.cygnus.com>]
* Re: [RFA] Fix for gdb-gnats bug #14
[not found] <200102170027.QAA01551@bosch.cygnus.com>
@ 2001-02-16 16:44 ` John R. Moore
0 siblings, 0 replies; 9+ messages in thread
From: John R. Moore @ 2001-02-16 16:44 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gdb-patches
On Fri, 16 Feb 2001, Michael Elizabeth Chastain wrote:
> I proofread this patch plus I tested on a Solaris 2.6 native with gcc
> 2.9-gnupro-99r1. It works for me.
>
> I recommend that the maintainers approve the patch as submitted.
>
> But I have more comments ...
>
> I note that the test has two branches: an hpux branch and a non-hpux
> branch. This is strange, because the underlying feature is not
> target specific.
>
> The hpux branch contains the correct expectatation: it expects the "step"
> commands not to run. I checked this by reading the test carefully and
> also by examining test results:
>
> /tantor/build/gnupro-00r1/hppa1.1-hp-hpux10.20/tests/hppa1.1-hp-hpux10.20/010214/gdb/testsuite/gdb.log
> /tantor/build/gnupro-00r1/sparc-sun-solaris2.6/tests/sparc-sun-solaris2.6/010204/gdb/testsuite/gdb.log
>
> So:
>
> . gdb always behaves as documented in the manual
> . the hpux version of the test is correct.
> gdb behaves as documented, and the test PASSes.
> . the non-hpux version of the test is incorrect.
> gdb behaves as documented, but the test FAILs.
> . your patch actually makes the non-hpux test the same as the hpux test
>
> If you care to do more work, you could remove the hpux test, kill the
> non-hpux expression completely, and use the hpux expression on all
> platforms.
>
> It's up to the maintainers (Stan Shebs and Fernando Nasser) whether
> to accept the patch or remand it for more work. I recommend accepting it
> and then doing more work as a second patch.
>
> Michael Elizabeth Chastain
I (of course) noted the same and wondered why the hpux might be
different, but didn't give it a second thought, thinking that there
always could be an exception (and besides, I didn't have an hpux
to try it out on).
I see no big deal (do more work) to eliminate the hpux exception.
It might be that somebody somewhere fixed this once on an hpux,
but didn't bother to fix any other os? The more work would simply
involve removing the "if hpux" block of script.
John
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Fix for gdb-gnats bug #14
@ 2001-02-16 13:44 Michael Elizabeth Chastain
2001-02-16 13:56 ` John R. Moore
0 siblings, 1 reply; 9+ messages in thread
From: Michael Elizabeth Chastain @ 2001-02-16 13:44 UTC (permalink / raw)
To: gdb-patches, jmoore
Hi John,
I'm having trouble applying this patch. The original file has a lot
of TAB characters in it, but in your patch, they are expanded to spaces.
This makes the patch not apply, and it also makes the new code incorrect
(these TABs are literal characters in regular expressions).
Could you please check your source carefully to make sure that you have
the right characters in the new source lines 213-214:
\ [ SPACE TAB \ ] *
Once the source file is correct, be careful with cut-and-paste, and
check your mailer.
Also the first line of the ChangeLog starts with eight spaces; please make
that a tab. I wouldn't mention that except I am asking you to re-make
the patch anyways.
Michael
===
The fix was tested on Red Hat Linux 7.0 with 2.4 kernel.
2001-02-16 John Moore <jmoore@redhat.com>
* gdb.base/commands.exp (infrun_breakpoint_command_test):
Removed non-expected items following a "step" command
(see gnats bug report for gdb #14).
Index: gdb.base/commands.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/commands.exp,v
retrieving revision 1.6
diff -p -u -w -r1.6 commands.exp
--- commands.exp 2000/10/24 18:36:32 1.6
+++ commands.exp 2001/02/16 17:48:18
@@ -210,17 +210,8 @@ proc infrun_breakpoint_command_test {} {
gdb_test "continue" \
"Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*
\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*
-factorial \\(value=4\\) at.*\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*
-factorial \\(value=3\\) at .*
-\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-#0 factorial \\(value=3\\).*
-#1 \[0-9a-fx\]* in factorial \\(value=4\\).*
-#2 \[0-9a-fx\]* in factorial \\(value=5\\).*
-#3 \[0-9a-fx\]* in factorial \\(value=6\\).*
-#4 \[0-9a-fx\]* in main \\(.*\\).*" \
- "continue in infrun_breakpoint_command_test";
+\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*" \
+ "continue in infrun_breakpoint_command_test"
}
gdb_stop_suppressing_tests;
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFA] Fix for gdb-gnats bug #14
2001-02-16 13:44 Michael Elizabeth Chastain
@ 2001-02-16 13:56 ` John R. Moore
0 siblings, 0 replies; 9+ messages in thread
From: John R. Moore @ 2001-02-16 13:56 UTC (permalink / raw)
To: Michael Elizabeth Chastain, gdb-patches
On Fri, 16 Feb 2001, Michael Elizabeth Chastain wrote:
> Hi John,
>
> I'm having trouble applying this patch. The original file has a lot
> of TAB characters in it, but in your patch, they are expanded to spaces.
> This makes the patch not apply, and it also makes the new code incorrect
> (these TABs are literal characters in regular expressions).
>
> Could you please check your source carefully to make sure that you have
> the right characters in the new source lines 213-214:
>
> \ [ SPACE TAB \ ] *
>
> Once the source file is correct, be careful with cut-and-paste, and
> check your mailer.
>
> Also the first line of the ChangeLog starts with eight spaces; please make
> that a tab. I wouldn't mention that except I am asking you to re-make
> the patch anyways.
>
> Michael
>
Hmmm.... Yes, I cut and pasted, and this probably accounts for the
difference.
I'll re-do and make sure all the tabs are included.
John
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFA] Fix for gdb-gnats bug #14
@ 2001-02-16 10:04 John R. Moore
2001-02-16 14:40 ` John R. Moore
0 siblings, 1 reply; 9+ messages in thread
From: John R. Moore @ 2001-02-16 10:04 UTC (permalink / raw)
To: gdb-patches
The fix was tested on Red Hat Linux 7.0 with 2.4 kernel.
2001-02-16 John Moore <jmoore@redhat.com>
* gdb.base/commands.exp (infrun_breakpoint_command_test):
Removed non-expected items following a "step" command
(see gnats bug report for gdb #14).
Index: gdb.base/commands.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/commands.exp,v
retrieving revision 1.6
diff -p -u -w -r1.6 commands.exp
--- commands.exp 2000/10/24 18:36:32 1.6
+++ commands.exp 2001/02/16 17:48:18
@@ -210,17 +210,8 @@ proc infrun_breakpoint_command_test {} {
gdb_test "continue" \
"Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*
\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*
-factorial \\(value=4\\) at.*\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*
-factorial \\(value=3\\) at .*
-\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-#0 factorial \\(value=3\\).*
-#1 \[0-9a-fx\]* in factorial \\(value=4\\).*
-#2 \[0-9a-fx\]* in factorial \\(value=5\\).*
-#3 \[0-9a-fx\]* in factorial \\(value=6\\).*
-#4 \[0-9a-fx\]* in main \\(.*\\).*" \
- "continue in infrun_breakpoint_command_test";
+\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*" \
+ "continue in infrun_breakpoint_command_test"
}
gdb_stop_suppressing_tests;
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFA] Fix for gdb-gnats bug #14
2001-02-16 10:04 John R. Moore
@ 2001-02-16 14:40 ` John R. Moore
0 siblings, 0 replies; 9+ messages in thread
From: John R. Moore @ 2001-02-16 14:40 UTC (permalink / raw)
To: gdb-patches
Resending this being careful about tabs.
Note that this was tested using gcc version 2.97 (cvs version)
built on Feb 13th.
The fix was tested on Red Hat Linux 7.0 with 2.4 kernel.
2001-02-16 John Moore <jmoore@redhat.com>
* gdb.base/commands.exp (infrun_breakpoint_command_test):
Removed non-expected items following a "step" command
(see gnats bug report for gdb #14).
Index: gdb.base/commands.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/commands.exp,v
retrieving revision 1.6
diff -p -u -w -r1.6 gdb/testsuite/gdb.base/commands.exp
--- commands.exp 2000/10/24 18:36:32 1.6
+++ commands.exp 2001/02/16 17:48:18
@@ -210,17 +210,8 @@ proc infrun_breakpoint_command_test {} {
gdb_test "continue" \
"Breakpoint \[0-9\]*, factorial \\(value=5\\).*at.*
\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*
-factorial \\(value=4\\) at.*\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*
-factorial \\(value=3\\) at .*
-\[0-9\]*\[ \]*if \\(value > 1\\) \{.*
-#0 factorial \\(value=3\\).*
-#1 \[0-9a-fx\]* in factorial \\(value=4\\).*
-#2 \[0-9a-fx\]* in factorial \\(value=5\\).*
-#3 \[0-9a-fx\]* in factorial \\(value=6\\).*
-#4 \[0-9a-fx\]* in main \\(.*\\).*" \
- "continue in infrun_breakpoint_command_test";
+\[0-9\]*\[ \]*value \\*= factorial \\(value - 1\\);.*" \
+ "continue in infrun_breakpoint_command_test"
}
gdb_stop_suppressing_tests;
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-02-18 15:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-18 15:57 [RFA] Fix for gdb-gnats bug #14 Michael Elizabeth Chastain
-- strict thread matches above, loose matches on Subject: below --
2001-02-16 17:54 Michael Elizabeth Chastain
2001-02-16 17:19 Michael Elizabeth Chastain
2001-02-16 17:36 ` Michael Snyder
[not found] <200102170027.QAA01551@bosch.cygnus.com>
2001-02-16 16:44 ` John R. Moore
2001-02-16 13:44 Michael Elizabeth Chastain
2001-02-16 13:56 ` John R. Moore
2001-02-16 10:04 John R. Moore
2001-02-16 14:40 ` John R. Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox