From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29550 invoked by alias); 6 Feb 2003 22:13:17 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 29539 invoked from network); 6 Feb 2003 22:13:17 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 6 Feb 2003 22:13:17 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h16MDHf14294 for ; Thu, 6 Feb 2003 17:13:17 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h16MDHa16004; Thu, 6 Feb 2003 17:13:17 -0500 Received: from [150.1.200.14] (vpn50-24.rdu.redhat.com [172.16.50.24]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h16MDGB10166; Thu, 6 Feb 2003 17:13:16 -0500 Subject: Re: GDB/MI absolute path From: Keith Seitz To: Bob Rossi Cc: gdb@sources.redhat.com In-Reply-To: <20030206215525.GC7441@white> References: <20030206215525.GC7441@white> Content-Type: text/plain Organization: Message-Id: <1044569850.2029.144.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Date: Thu, 06 Feb 2003 22:13:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00139.txt.bz2 On Thu, 2003-02-06 at 13:55, Bob Rossi wrote: > Also, what is the best way to ask mi for the absolute path to the > current source file. This wasn't a problem using annotate 1 or 2, and I > can't figure out how to get it using mi. This is a known (to me) problem with MI. The problem is that MI was desinged to work with an IDE, not just a standalone GUI for the debugger. In the case of an IDE, this information isn't needed, since the IDE knows everything there is to know about files. However, like Insight, cgdb will need some way of turning "../foo/bar/baz.c" into "/home/a/b/c/foo/bar/baz.c". There are two options (excluding hacks around the problem): 1. Get the complete source search path from GDB and let the GUI search for the file. This means the GUI writer would also need the compile directory for each file. 2. Get gdb to tell you where it thinks a file is located. Of course, I think we'll all agree that #2 is preferred. This is the route we took in Insight (see gdbtk/generic/gdbtk-cmds.c:gdb_find_file_command). Phew! After saying all that, the real response to your question is: "It's a bug: open a new bug report." :-( Keith