From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22767 invoked by alias); 19 Dec 2001 17:50:04 -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 20939 invoked from network); 19 Dec 2001 17:48:46 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 19 Dec 2001 17:48:46 -0000 Received: from cygnus.com (reddwarf.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id JAA23472; Wed, 19 Dec 2001 09:48:45 -0800 (PST) Message-ID: <3C20D221.B2E0EA12@cygnus.com> Date: Wed, 19 Dec 2001 09:50:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Jim Blandy CC: gdb-patches@sources.redhat.com Subject: Re: RFA: fix start symbol matching again References: <20011219071008.EE0625E9D8@zwingli.cygnus.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00465.txt.bz2 Jim Blandy wrote: > > If the comment isn't clear, let me know. It's a little late, and I'm > not writing very well. At this point, I'm kinda unclear on what problem you're fixing; but if it's this difficult, we could just make the $START symbol a configurable variable. Default it to "_start" but allow it to be set to "start" by such target architectures as need to do so. > > 2001-12-19 Jim Blandy > > * gdb.asm/asm-source.exp (info symbol): Take another shot at > anchoring the pattern matching the entry point symbol's name. > > Index: gdb/testsuite/gdb.asm/asm-source.exp > =================================================================== > RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.asm/asm-source.exp,v > retrieving revision 1.24 > diff -c -r1.24 asm-source.exp > *** gdb/testsuite/gdb.asm/asm-source.exp 2001/12/17 14:57:49 1.24 > --- gdb/testsuite/gdb.asm/asm-source.exp 2001/12/19 07:06:11 > *************** > *** 159,171 **** > set entry_symbol "" > send_gdb "info symbol 0x$entry_point\n" > gdb_expect { > ! -re "info symbol 0x$entry_point\[\r\n\]*" { > ! exp_continue > ! } > ! -re "^(.*) in section .*$gdb_prompt $" { > ! # It's important to anchor the pattern above at the beginning > ! # of the line. Without that carat, the (.*) may end up > ! # matching the empty string. > set entry_symbol $expect_out(1,string) > pass "info symbol" > } > --- 159,172 ---- > set entry_symbol "" > send_gdb "info symbol 0x$entry_point\n" > gdb_expect { > ! -re "info symbol 0x$entry_point\[\r\n\]+(\[^\r\n\]*) in section .*$gdb_prompt $" { > ! # We match the echoed `info symbol' command here, to help us > ! # reliably identify the beginning of the start symbol in its > ! # output. We have to start matching exactly at the beginning > ! # of the line, no earlier or later. You might think we could > ! # just use '^', but unfortunately, in expect, '^' matches the > ! # beginning of the unmatched input, not necessarily the > ! # beginning of a line. > set entry_symbol $expect_out(1,string) > pass "info symbol" > }