Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: PATCH to testsuite/gdb.c++/namespace.exp
@ 2002-01-10  8:50 Michael Elizabeth Chastain
  2002-01-10  9:36 ` Michael Snyder
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2002-01-10  8:50 UTC (permalink / raw)
  To: gdb-patches, jason

gdb built from the 5.1 branch prints '\000'.  It looks like one of those
endless cosmetic changes where the testsuite did not keep up with some
change in gdb.

I'm happy with the patch, except that you need to add "2002" to the list
of copyright years in line 1 of gdb.c++/namespace.exp.  Thanks.

Michael C


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

* Re: PATCH to testsuite/gdb.c++/namespace.exp
  2002-01-10  8:50 PATCH to testsuite/gdb.c++/namespace.exp Michael Elizabeth Chastain
@ 2002-01-10  9:36 ` Michael Snyder
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Snyder @ 2002-01-10  9:36 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb-patches, jason

Michael Elizabeth Chastain wrote:
> 
> gdb built from the 5.1 branch prints '\000'.  It looks like one of those
> endless cosmetic changes where the testsuite did not keep up with some
> change in gdb.
> 
> I'm happy with the patch, except that you need to add "2002" to the list
> of copyright years in line 1 of gdb.c++/namespace.exp.  Thanks.


Would it not be better, then, if the test accepted both 
 \0 and \000?


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

* Re: PATCH to testsuite/gdb.c++/namespace.exp
@ 2002-01-10 10:34 Michael Elizabeth Chastain
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2002-01-10 10:34 UTC (permalink / raw)
  To: msnyder; +Cc: gdb-patches, jason

Works for me.  Thanks!

Michael C

===

2002-01-10  Michael Snyder  <msnyder@redhat.com>

        * gdb.c++/namespace.exp: Accept both '\0' and '\000'.


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

* Re: PATCH to testsuite/gdb.c++/namespace.exp
  2002-01-10 10:06 Michael Elizabeth Chastain
@ 2002-01-10 10:28 ` Michael Snyder
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Snyder @ 2002-01-10 10:28 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb-patches, jason

Michael Elizabeth Chastain wrote:
> 
> Michael Snyder wrote:
> > Would it not be better, then, if the test accepted both
> >  \0 and \000?
> 
> I thought about that.  It would be better; and if I had written the
> patch, I would have written it that way.
> 
> But there's so much to do in C++ land, and so little time, that I'd
> rather let it be.  I'm 100x more worried about things like this:
> 
>   # native i686-pc-linux-gnu
>   # gdb HEAD (2001-12-22)
>   # gcc 2.95.3
>   # -gdwarf-2
>   print this^M
>   $1 = (A * const) 0xa^M
>   (gdb) PASS: gdb.c++/method.exp: print this (in foo)
> 
> gdb is printing an incorrect value and the testsuite does not catch it.
> This is a bug in gdb and a shortfall in the testsuite and it affects
> real users.
> 
> I am organizing my life so that I have more time to care about bugs
> like that.  That means conserving attention on lesser things, to their
> detriment.  It's an attention-triage question.

That's OK, your opinion is all I crave...

> But if this issue bothers you enough to submit a patch, I will approve it.

Taking that for approval, I have checked in the following:

2002-01-10  Michael Snyder  <msnyder@redhat.com>

        * gdb.c++/namespace.exp: Accept both '\0' and '\000'.

Index: namespace.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/namespace.exp,v
retrieving revision 1.10
diff -c -3 -p -r1.10 namespace.exp
*** namespace.exp       2002/01/10 17:48:03     1.10
--- namespace.exp       2002/01/10 18:24:52
*************** gdb_test "up" ".*main.*" "up from marker
*** 80,86 ****
  
  send_gdb "print 'AAA::c'\n"
  gdb_expect {
!    -re "\\$\[0-9\]* = 0 '\\\\0'\r\n$gdb_prompt $" { pass "print
'AAA::c'" }
     -re ".*$gdb_prompt $" { fail "print 'AAA::c'" }
     timeout { fail "(timeout) print 'AAA::c'" }
  }
--- 80,86 ----
  
  send_gdb "print 'AAA::c'\n"
  gdb_expect {
!    -re "\\$\[0-9\]* = 0 '\\\\(0|000)'\r\n$gdb_prompt $" { pass "print
'AAA::c'" }
     -re ".*$gdb_prompt $" { fail "print 'AAA::c'" }
     timeout { fail "(timeout) print 'AAA::c'" }
  }


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

* Re: PATCH to testsuite/gdb.c++/namespace.exp
@ 2002-01-10 10:06 Michael Elizabeth Chastain
  2002-01-10 10:28 ` Michael Snyder
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Elizabeth Chastain @ 2002-01-10 10:06 UTC (permalink / raw)
  To: msnyder; +Cc: gdb-patches, jason

Michael Snyder wrote:
> Would it not be better, then, if the test accepted both 
>  \0 and \000?

I thought about that.  It would be better; and if I had written the
patch, I would have written it that way.

But there's so much to do in C++ land, and so little time, that I'd
rather let it be.  I'm 100x more worried about things like this:

  # native i686-pc-linux-gnu
  # gdb HEAD (2001-12-22)
  # gcc 2.95.3
  # -gdwarf-2
  print this^M
  $1 = (A * const) 0xa^M
  (gdb) PASS: gdb.c++/method.exp: print this (in foo)

gdb is printing an incorrect value and the testsuite does not catch it.
This is a bug in gdb and a shortfall in the testsuite and it affects
real users.

I am organizing my life so that I have more time to care about bugs
like that.  That means conserving attention on lesser things, to their
detriment.  It's an attention-triage question.

But if this issue bothers you enough to submit a patch, I will approve it.

Michael C


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

* PATCH to testsuite/gdb.c++/namespace.exp
@ 2002-01-10  5:20 Jason Merrill
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Merrill @ 2002-01-10  5:20 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

Applied as obvious; gdb doesn't print the full three octal digits for a
null character.

2002-01-10  Jason Merrill  <jason@redhat.com>

	* gdb.c++/namespace.exp: '\0', not '\000'.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 643 bytes --]

*** namespace.exp.~1~	Tue Jan  8 11:46:08 2002
--- namespace.exp	Thu Jan 10 12:55:59 2002
*************** gdb_test "up" ".*main.*" "up from marker
*** 80,86 ****
  
  send_gdb "print 'AAA::c'\n"
  gdb_expect {
!    -re "\\$\[0-9\]* = 0 '\\\\000'\r\n$gdb_prompt $" { pass "print 'AAA::c'" }
     -re ".*$gdb_prompt $" { fail "print 'AAA::c'" }
     timeout { fail "(timeout) print 'AAA::c'" }
  }
--- 80,86 ----
  
  send_gdb "print 'AAA::c'\n"
  gdb_expect {
!    -re "\\$\[0-9\]* = 0 '\\\\0'\r\n$gdb_prompt $" { pass "print 'AAA::c'" }
     -re ".*$gdb_prompt $" { fail "print 'AAA::c'" }
     timeout { fail "(timeout) print 'AAA::c'" }
  }

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

end of thread, other threads:[~2002-01-10 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-10  8:50 PATCH to testsuite/gdb.c++/namespace.exp Michael Elizabeth Chastain
2002-01-10  9:36 ` Michael Snyder
  -- strict thread matches above, loose matches on Subject: below --
2002-01-10 10:34 Michael Elizabeth Chastain
2002-01-10 10:06 Michael Elizabeth Chastain
2002-01-10 10:28 ` Michael Snyder
2002-01-10  5:20 Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox