From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13135 invoked by alias); 28 Apr 2005 07:05:16 -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 12931 invoked from network); 28 Apr 2005 07:04:54 -0000 Received: from unknown (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org with SMTP; 28 Apr 2005 07:04:54 -0000 Received: from zaretski (IGLD-80-230-65-115.inter.net.il [80.230.65.115]) by romy.inter.net.il (MOS 3.5.6-GR) with ESMTP id BCA27203 (AUTH halo1); Thu, 28 Apr 2005 10:04:28 +0300 (IDT) Date: Thu, 28 Apr 2005 07:05:00 -0000 From: "Eli Zaretskii" To: bug-gdb@gnu.org, gdb-patches@sources.redhat.com Message-ID: <01c54bc0$Blat.v2.4$72505b00@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 In-reply-to: <20050427180410.GA19592@nevyn.them.org> (message from Daniel Jacobowitz on Wed, 27 Apr 2005 14:04:10 -0400) Subject: Re: [RFA] Fix file name generation in edit_command (was: Ver 6.3 edit command failing) Reply-to: Eli Zaretskii References: <01c54b35$Blat.v2.4$c3f52520@zahav.net.il> <20050427143620.GA1686@nevyn.them.org> <01c54b40$Blat.v2.4$be3bafe0@zahav.net.il> <20050427180410.GA19592@nevyn.them.org> X-SW-Source: 2005-04/txt/msg00385.txt.bz2 > Date: Wed, 27 Apr 2005 14:04:10 -0400 > From: Daniel Jacobowitz > Cc: bug-gdb@rich-paul.net, bug-gdb@gnu.org, gdb-patches@sources.redhat.com > > It strikes me as odd that you can use "edit" if GDB doesn't know where > the source file is. I thought about that, and decided to leave that code alone: GDB might indeed not know where's the source, but the user could know more. Most editors let you open files from inside the editor, so a user could still edit the file. > Also, symtab_to_fullname includes the cached fullname check. So what's > your opinion of boiling the whole thing down to: > > fn = symtab_to_fullname (sal.symtab); > if (fn == NULL) > error (_("Could not find file \"%s\""), sal.symtab->filename); > p = xstrprintf ("%s +%d %s", editor, sal.line, fn); > > Mark, can I have those bonus points? :-) Well, perhaps you should commit this, then. There's not a single line written by me in this snippet, so it would be misleading for me to claim the credits in the logs.