From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9309 invoked by alias); 9 Jan 2015 10:52:41 -0000 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 Received: (qmail 9299 invoked by uid 89); 9 Jan 2015 10:52:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 09 Jan 2015 10:52:39 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t09AqOKn017843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Jan 2015 05:52:25 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t09AqMO5022155; Fri, 9 Jan 2015 05:52:23 -0500 Message-ID: <54AFB2E5.5080307@redhat.com> Date: Fri, 09 Jan 2015 10:52:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Pierre Muller , "'gdb-patches'" CC: gpc@gnu.de Subject: Re: gdb-patches RFA: Fix pascal behavior for class fields References: <54ae4586.01e3440a.7b06.fffff844SMTPIN_ADDED_BROKEN@mx.google.com> <54AE605A.8050308@redhat.com> <54ae7f9f.c323460a.36ed.ffffff30SMTPIN_ADDED_BROKEN@mx.google.com> <54AE8914.4010507@redhat.com> <54ae911b.85e3440a.1d96.5ffdSMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: <54ae911b.85e3440a.1d96.5ffdSMTPIN_ADDED_BROKEN@mx.google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00212.txt.bz2 On 01/08/2015 02:15 PM, Pierre Muller wrote: > For gpc mailing list: > this email comes as a follow-up of this bug report > https://sourceware.org/bugzilla/show_bug.cgi?id=17815 > > The start of the thread can be found at: > https://sourceware.org/ml/gdb-patches/2015-01/msg00164.html > > Pedro asked: >>>> How about adding this to the test suite? >>> >>> >>> The whole testsuite/gdb.pascal is almost empty, >>> I never invested time to develop it :( >>> >>> At the time I started it, GPC (the GNU pascal compiler) >>> was still active, but development apparently >>> stopped since quite some time. >>> >>> I am unable to install GPC, which means that I cannot test it. >>> Would a testsuite that supports only Free Pascal be acceptable? >> >> Do you actually mean, whether it's ok for a new >> test (not test suite) to go in untested on GPC? It certainly is. >> Better test on FPC than nowhere. :-) > That is indeed what I meant. > >> AFAICS, the tests themselves don't really care which compiler >> is in use other than for marking xfails; you just call >> gdb_compile_pascal, >> and that works with either. That's my impression from quickly >> skimming testsuite/lib/pascal.exp. > > The problem is that GPC and Free Pascal support several > pascal 'dialects'. But this requires command line options. > > The -Mobjfpc option is required for Free Pascal compiler > to understand class type definition, but is rejected in default mode. > > I expect GNU GPC to also reject class in 'normal' mode... > Maybe someone on the gpc mailing list knows if classes are supported > by GPC and if it requires a special compiler option. I'd suggest adding support for a new option to gdb_compile_pascal, like "objfpc", so you'd compile the test with: if {[gdb_compile_pascal ... executable [list debug objfpc]] != "" } { untested $testfile.exp return -1 } You'd teach fpc_compile about the new option: proc fpc_compile {source dest type options} { ... foreach i $options { ... } elseif { $i == "objfpc" } { append add_flags " -Mobjfpc" } ... } Someone that cares about testing with GNU GPC would then do the equivalent to gpc_compile, if anything is necessary. If gpc simply fails to compile the test, it's no biggie, as gdb_compile_pascal returns false, and the test is skipped with "untested". There may be a more generic and common name for the mode, like "obj-pascal" or something, but I wouldn't know. Thanks, Pedro Alves