Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* 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-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
[parent not found: <200102170027.QAA01551@bosch.cygnus.com>]
* 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
* [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

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-16 17:19 [RFA] Fix for gdb-gnats bug #14 Michael Elizabeth Chastain
2001-02-16 17:36 ` Michael Snyder
  -- strict thread matches above, loose matches on Subject: below --
2001-02-18 15:57 Michael Elizabeth Chastain
2001-02-16 17:54 Michael Elizabeth Chastain
     [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