From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18476 invoked by alias); 20 Feb 2010 12:26:12 -0000 Received: (qmail 18466 invoked by uid 22791); 20 Feb 2010 12:26:12 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from relay-pt2.poste.it (HELO relay-pt2.poste.it) (62.241.5.253) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Feb 2010 12:26:07 +0000 Received: from geppetto.caos.org (78.15.160.25) by relay-pt2.poste.it (8.5.121.01) (authenticated as stefano.sabatini-lala@poste.it) id 4B7F264F0000ECFF for gdb@sources.redhat.com; Sat, 20 Feb 2010 13:26:04 +0100 Received: from stefano by geppetto.caos.org with local (Exim 4.71) (envelope-from ) id 1NioO9-0002VZ-OA for gdb@sources.redhat.com; Sat, 20 Feb 2010 13:24:49 +0100 Date: Sat, 20 Feb 2010 12:26:00 -0000 From: Stefano Sabatini To: gdb Mailing List Subject: How to show the file being executed? Message-ID: <20100220122449.GA9150@geppetto> Mail-Followup-To: gdb Mailing List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00147.txt.bz2 Hi all, I'm running gdb 7.0 and first of all let me thank you, it's simply *AWESOME*, reversible debugging and scripting are some features we always dreamt for, and now they're finally available to all the free world, thanks!! I have a small problem, I need to show the name of the file debugged in a gdb script, and info target looks overkill as it shows too much information. (gdb) show version GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: . (gdb) info target Symbols from "/home/stefano/src/PROGRAM". Unix child process: Using the running image of child Thread 0xb5f33b70 (LWP 8998). While running this, GDB does not access memory from... Local exec file: `/home/stefano/src/PROGRAM', file type elf32-i386. Entry point: 0x804bc70 0x08048134 - 0x08048147 is .interp 0x08048148 - 0x08048168 is .note.ABI-tag 0x08048168 - 0x0804818c is .note.gnu.build-id [...] There is some way to show *only* this information?, otherwise I suggest to implement a show file command. Regards.