From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11918 invoked by alias); 6 Nov 2002 20:31:38 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11910 invoked from network); 6 Nov 2002 20:31:37 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 6 Nov 2002 20:31:37 -0000 Received: (from jimb@localhost) by zenia.red-bean.com (8.11.6/8.11.6) id gA6KGkp21970; Wed, 6 Nov 2002 15:16:46 -0500 To: gdb-patches@sources.redhat.com Subject: Re: RFA: test macro expansion in presence of #line directives References: From: Jim Blandy Date: Wed, 06 Nov 2002 12:31:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.90 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-11/txt/msg00120.txt.bz2 Here's a revision of this test, which depends on the addition of the gdb_internal_error_resync function and its use in gdb_test, done in the previous patch. gdb/testsuite/ChangeLog: 2002-11-01 Jim Blandy * gdb.base/step-line.exp: Check that GDB can handle filenames that appear in the line number info, but not in the preprocessor macro info. Index: gdb/testsuite/gdb.base/step-line.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/step-line.exp,v retrieving revision 1.1 diff -c -r1.1 step-line.exp *** gdb/testsuite/gdb.base/step-line.exp 27 Mar 2001 01:32:45 -0000 1.1 --- gdb/testsuite/gdb.base/step-line.exp 6 Nov 2002 20:23:19 -0000 *************** *** 53,58 **** --- 53,67 ---- gdb_test "next" \ ".*i = f2 \\(i\\);.*" \ "next over dummy 1" + + # As of Oct 2002, GCC does record the effect of #line directives in + # the source line info, but not in macro info. This means that GDB's + # symtabs (built from the former, among other things) may mention + # filenames that GDB's macro tables (built from the latter) don't have + # any record of. Make sure GDB can handle this by trying to evaluate + # an expression, which will do a macro expansion. + gdb_test "print i" ".* = 4.*" + gdb_test "next" \ ".*dummy \\(2, i\\);.*" \ "next to dummy 2"