From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13807 invoked by alias); 2 Oct 2007 12:39:17 -0000 Received: (qmail 13799 invoked by uid 22791); 2 Oct 2007 12:39:16 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 Oct 2007 12:39:13 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B9BDB98152; Tue, 2 Oct 2007 12:39:11 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 952169810B; Tue, 2 Oct 2007 12:39:11 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1Ich1q-0003t8-M4; Tue, 02 Oct 2007 08:39:10 -0400 Date: Tue, 02 Oct 2007 12:39:00 -0000 From: Daniel Jacobowitz To: Bogdan Slusarczyk Cc: gdb@sourceware.org Subject: Re: how to find where specified variable is declared? Message-ID: <20071002123910.GA14909@caradoc.them.org> Mail-Followup-To: Bogdan Slusarczyk , gdb@sourceware.org References: <470233D9.1030207@op.pl> <20071002120716.GA13196@caradoc.them.org> <47023933.4020109@op.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47023933.4020109@op.pl> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-10/txt/msg00015.txt.bz2 On Tue, Oct 02, 2007 at 02:27:31PM +0200, Bogdan Slusarczyk wrote: > >> Does gdb have information about source file for specified variable (I want to > >> find where such variable is declared)?. > > Try "list varname"? > > It works only for function names :( It works fine for variables here. (gdb) set listsize 1 (gdb) list inferior_ptid 146 ptid_t inferior_ptid; (gdb) info source Current source file is /space/fsf/commit/src/gdb/infcmd.c -- Daniel Jacobowitz CodeSourcery