From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20097 invoked by alias); 16 Dec 2008 10:28:41 -0000 Received: (qmail 20089 invoked by uid 22791); 16 Dec 2008 10:28:41 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from eu1sys200aog105.obsmtp.com (HELO eu1sys200aog105.obsmtp.com) (207.126.144.119) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Dec 2008 10:27:56 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKSUeClDcGrm/dPEVSwJ0ejI8k1i5pHExI@postini.com; Tue, 16 Dec 2008 10:27:56 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 0397BDABC; Tue, 16 Dec 2008 10:27:05 +0000 (GMT) Received: from mail2.gnb.st.com (mail2.gnb.st.com [164.129.119.59]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 243BF4C04C; Tue, 16 Dec 2008 10:27:17 +0000 (GMT) Received: from [164.129.122.46] (gnx2504.gnb.st.com [164.129.122.46]) by mail2.gnb.st.com (MOS 3.8.7a) with ESMTP id CYU06730 (AUTH lyon); Tue, 16 Dec 2008 11:27:29 +0100 (CET) Message-ID: <49478284.5070008@st.com> Date: Tue, 16 Dec 2008 10:28:00 -0000 From: Christophe LYON User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] testsuite gdb.base/expand-psymtabs: ensure code is generated for the expected source line References: <493D3C16.3010303@st.com> <20081216062835.GP6866@adacore.com> In-Reply-To: <20081216062835.GP6866@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-12/txt/msg00303.txt.bz2 On 16.12.2008 07:28, Joel Brobecker wrote: >> I propose the attached small patch to expand-psymtabs.c. The goal is to >> make sure the compiler actually generates code and debug information for >> the expected line. Currently, our compiler attaches code only to the >> opening brace, hence causing the test to fail. > > Does you compiler also attach the epilogue code to the opening brace > as well. With GCC, the epilogue is attached to the closing brace, > and so breaking on the empty line causes the breakpoint to be inserted > at the beginning of the epilogue. > Yes, with an empty function, all the code is attached to the opening brace. >> 2008-12-08 Christophe Lyon >> >> * gdb.base/expand-psymtabs.c: Insert code in foo so that the >> compiler actually generate code at the expected line number. > > Seems harmless in any case, and in fact, the original version of > the testcase when submitted included a function call at this location. > The reason why it was removed was that it was calling an IO function, > which is a no-no if we can avoid it (so that the testcase can be run > on targets that do not provide these routines). > > OK to check in. > Thanks. I'll ask Denis Pilat to check it in on my behalf. Christophe.