From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1327 invoked by alias); 13 Oct 2008 12:31:39 -0000 Received: (qmail 1319 invoked by uid 22791); 13 Oct 2008 12:31:38 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog10.obsmtp.com (HELO s200aog10.obsmtp.com) (207.126.144.124) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Oct 2008 12:30:54 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob010.postini.com ([207.126.147.11]) with SMTP; Mon, 13 Oct 2008 12:30:50 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B0070DB12 for ; Mon, 13 Oct 2008 12:30:50 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8ADDD4BFB3 for ; Mon, 13 Oct 2008 12:30:50 +0000 (GMT) Received: from crx595.cro.st.com (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.8.7a) with ESMTP id CQC17204 (AUTH "denis pilat"); Mon, 13 Oct 2008 14:31:50 +0200 (CEST) Message-ID: <48F33F79.3050703@st.com> Date: Mon, 13 Oct 2008 12:31:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: gdb-patches Subject: Re: gdb.cp/userdef.exp, class reprensentation References: <48F3333C.2080902@st.com> <20081013115152.GA14801@caradoc.them.org> In-Reply-To: <20081013115152.GA14801@caradoc.them.org> Content-Type: multipart/mixed; boundary="------------040004020207070502030706" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00338.txt.bz2 This is a multi-part message in MIME format. --------------040004020207070502030706 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1173 Daniel Jacobowitz wrote: > On Mon, Oct 13, 2008 at 01:38:36PM +0200, Denis PILAT wrote: > >> But the userdef.exp testsuite only expects gdb to return the 2nd >> semantic, which is fine with some gdb based debuggers, but not for all. >> > > What does "some gdb based debuggers" mean? The testsuite is supposed > to accomodate the version of GDB it's shipped with, not other > versions. > I would have talked about compiler generated information. I have a compiler that generates debug information so that gdb prints this class as a class, and not a struct! The target is not a native one but an internal ST one, but I guess that there are other targeted gdbs that behave the same, and this behavior is correct to me! My patch was just to let some gdbs avoid an error in the testsuite that is not a real error, unless there is a consensus that tells simple class must be represented as structures. > >> @@ -153,7 +153,14 @@ >> gdb_test "print c" "\\\$\[0-9\]* = {m = {z = .*}}" >> > > Also, this is whitespace-damaged. > Sorry, I don't see it, I re-attach my patch as a real attachment, may be my mailer did something wrong -- Denis --------------040004020207070502030706 Content-Type: text/plain; name="userdef.exp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="userdef.exp.patch" Content-length: 922 2008-10-13 Denis Pilat * gdb.cp/userdef.exp: add a successful patern for for "ptype &*c". --- userdef.exp 2008-01-10 13:44:46.000000000 +0100 +++ /local/pd10/sts-gdb/trunk/sts-gdb/src/gdb/testsuite/gdb.cp/userdef.exp 2008-10-13 13:32:36.000000000 +0200 @@ -153,7 +153,14 @@ gdb_test "break A2::'operator +'" ".*Bre gdb_test "print c" "\\\$\[0-9\]* = {m = {z = .*}}" gdb_test "print *c" "\\\$\[0-9\]* = \\(Member &\\) @$hex: {z = .*}" gdb_test "print &*c" "\\\$\[0-9\]* = \\(Member \\*\\) $hex" -gdb_test "ptype &*c" "type = struct Member {\[\r\n \]+int z;\[\r\n\]+} &\\*" +gdb_test_multiple "ptype &*c" "ptype &*c" { + -re "type = struct Member {\[\r\n \]+int z;\[\r\n\]+} &\\*.*$gdb_prompt $" { + pass "ptype &*c" + } + -re "type = class Member {\[\r\n \]+ public:\[\r\n \]+int z;\[\r\n\]+} &\\*.*$gdb_prompt $" { + pass "ptype &*c" + } +} gdb_exit return 0 --------------040004020207070502030706--