From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30733 invoked by alias); 16 Dec 2008 06:29:29 -0000 Received: (qmail 30725 invoked by uid 22791); 16 Dec 2008 06:29:28 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Dec 2008 06:28:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 55CA42A9687; Tue, 16 Dec 2008 01:28:43 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id j5oZ5zbVUu3x; Tue, 16 Dec 2008 01:28:43 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 494432A967E; Tue, 16 Dec 2008 01:28:42 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 25B6DE7ACD; Tue, 16 Dec 2008 07:28:35 +0100 (CET) Date: Tue, 16 Dec 2008 06:29:00 -0000 From: Joel Brobecker To: Christophe LYON Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] testsuite gdb.base/expand-psymtabs: ensure code is generated for the expected source line Message-ID: <20081216062835.GP6866@adacore.com> References: <493D3C16.3010303@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <493D3C16.3010303@st.com> User-Agent: Mutt/1.4.2.2i 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/msg00300.txt.bz2 > 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. > 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. -- Joel