From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14329 invoked by alias); 21 Jun 2005 22:34:16 -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 14319 invoked by uid 22791); 21 Jun 2005 22:34:12 -0000 Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 21 Jun 2005 22:34:12 +0000 Received: from farnswood.snap.net.nz (p217-tnt2.snap.net.nz [202.124.108.217]) by viper.snap.net.nz (Postfix) with ESMTP id 6EB70550803; Wed, 22 Jun 2005 10:34:09 +1200 (NZST) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id AE93462A99; Tue, 21 Jun 2005 23:34:51 +0100 (BST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17080.38410.920459.599129@farnswood.snap.net.nz> Date: Tue, 21 Jun 2005 22:34:00 -0000 To: Midnight Xiong Cc: gdb@sources.redhat.com Subject: the fullname in MI In-Reply-To: <7f89a3ea05062114585b8e320b@mail.gmail.com> References: <7f89a3ea050621145727f72dad@mail.gmail.com> <7f89a3ea05062114585b8e320b@mail.gmail.com> X-SW-Source: 2005-06/txt/msg00198.txt.bz2 Midnight Xiong writes: > Hi, > I'm wondering, how can I get the fullname of source file in MI output? > For example, > ^done,reason="breakpoint-hit",bkptno="1",thread-id="1",frame={addr="0x00401342", > func="main",args=[{name="argc",value="1"},{name="argv",value="0x3d24c8"}],file=" > test.c",line="11"} > > For file="test.c", how can I determine the correct filename (with > absolute path)? > Thank you so much. What version of GDB are you using? GDB in the CVS repository prints the fullname since this change: 2005-05-17 Daniel Jacobowitz Dennis Brueni * stack.c (print_frame): In MI mode, output a fullname attribute with the stack frame. e.g (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080484d9",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff794"}],file="myprog.c",fullname="/home/nick/myprog.c",line="49"} (gdb) Nick