From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6828 invoked by alias); 9 Jan 2003 00:05: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 6818 invoked from network); 9 Jan 2003 00:05:02 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 9 Jan 2003 00:05:02 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18WS4X-0000oX-00 for ; Wed, 08 Jan 2003 20:05:29 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18WQC8-0001ug-00 for ; Wed, 08 Jan 2003 19:05:12 -0500 Date: Thu, 09 Jan 2003 00:05:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] post-process the `maint print architecture' from gdb_mbuild.sh Message-ID: <20030109000512.GA7283@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <200301022004.h02K4WT31218@duracef.shout.net> <3E1AEDEC.1040702@redhat.com> <20030107155435.GA12218@nevyn.them.org> <3E1CBB4E.4090405@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E1CBB4E.4090405@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-01/txt/msg00350.txt.bz2 On Wed, Jan 08, 2003 at 06:59:10PM -0500, Andrew Cagney wrote: > >On Tue, Jan 07, 2003 at 10:10:36AM -0500, Andrew Cagney wrote: > > > >>>>Thoughts? > > > >>> > >>> > >>>The idea sounds good to me. > >>> > >>>Instead of ed'ing Gdb.log, how about just naming the first file > >>>Gdb.out or Gdb-raw.log, and then sed'ing into Gdb.log. > > > >> > >>I can save the unedited output. > >> > >>To make sed worthwhile, I'd need to construct a sed script that did all > >>substitutions in a single pass. Otherwize the script ends up repeating: > >> sed -e ... < input > output > >> mv output input > >>which is equivalent to ed. That, I think, is something for a rainy day. > > > > > >It's as simple as "sed -e ... -e ... -e ... -e ... < input > output", > >isn't it? Or via -f and a file, the same thing. > > Yes - `construct a sed script'. I've done it (attached, committed). > Doesn't make it any faster though. The slow bit is: Thanks! > + func="`addr2line -f -e ./gdb/gdb -s ${addr} | sed -n -e 1p`" Yeah. Let me see if I can finish the other bit of code which has to find the binary anyway; then we can try doing this internally in the maint print architecture dump. That'd do wonders for our eyes :) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer