This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH to testsuite/gdb.c++/namespace.exp
- From: Michael Snyder <msnyder at redhat dot com>
- To: Michael Elizabeth Chastain <mec at shout dot net>
- Cc: gdb-patches at sources dot redhat dot com, jason at redhat dot com
- Date: Thu, 10 Jan 2002 10:24:29 -0800
- Subject: Re: PATCH to testsuite/gdb.c++/namespace.exp
- References: <200201101806.MAA25038@duracef.shout.net>
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'" }
}