From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11328 invoked by alias); 3 Jan 2003 23:27:46 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 11320 invoked from network); 3 Jan 2003 23:27:45 -0000 Received: from unknown (HELO duracef.shout.net) (204.253.184.12) by 209.249.29.67 with SMTP; 3 Jan 2003 23:27:45 -0000 Received: (from mec@localhost) by duracef.shout.net (8.11.6/8.11.6) id h03NRVA21462; Fri, 3 Jan 2003 17:27:31 -0600 Date: Fri, 03 Jan 2003 23:27:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200301032327.h03NRVA21462@duracef.shout.net> To: carlton@math.stanford.edu, gdb@sources.redhat.com Subject: Re: [rfc] xfailed tests in gdb.c++/classes.exp Cc: drow@mvista.com X-SW-Source: 2003-01/txt/msg00038.txt.bz2 > 1) GDB prints "class X { public: ... }" when the programmer originally > wrote "struct X { ... }". We talked about this about two years ago, and the consensus was that this is a bug in gdb. I did not agree with that consensus. > 2) GDB prints "class X { private: int x; ... }" when the programmer > originally wrote "class X { int x; ... }". I don't recall discussing this in particular. > The arguments for treating them as passes is as follows: GDB's goal > isn't to print out exactly what the programmer typed: it's to print > out a type that's equivalent to what the programmer typed, one that > gives all the information that the programmer needs. I believe in this. > And, in both of the cases above, programmers could replace their > definitions by the definitions that GDB prints out without changing the > behavior of their programs. I believe this is a good operational test. As a user, it's perfectly fine with me that GDB canonicalizes the class/struct when printing it out. It's vital that GDB prints _correct_ information. It's important that GDB prints _complete_ information. We have so many problems at this level with C++, it's a crying shame that we devote bug-handling resources to "class X { public: ... }". > Personally, I'd treat both these cases as passes. On the other hand, > Daniel's the C++ maintainer; if he thinks one or both of these cases > should be considered a bug in GDB, then I'll file PR's and KFAIL them > as appropriate. Ditto. Michael C