From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2610 invoked by alias); 23 Oct 2006 14:31:07 -0000 Received: (qmail 2600 invoked by uid 22791); 23 Oct 2006 14:31:07 -0000 X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (199.232.76.164) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 23 Oct 2006 14:31:05 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.34) id 1Gc0pN-0007J6-Th; Mon, 23 Oct 2006 10:30:57 -0400 From: Eli Zaretskii To: "Rob Quill" CC: gdb@sourceware.org In-reply-to: (rob.quill@gmail.com) Subject: Re: Command File Scope Checking Reply-to: Eli Zaretskii References: Message-Id: Date: Mon, 23 Oct 2006 14:31:00 -0000 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00214.txt.bz2 > Date: Mon, 23 Oct 2006 11:45:23 +0100 > From: "Rob Quill" > > Is it possible to check if a variable is in scope when using a command > file, because I don't want control to return to GDB when a variable > goes out of scope, so I would like to know if a variable is in scope > before I check the value of it. (gdb) info address foobar No symbol "foobar" in current context. If the variable _is_ in scope, you will see a different message, like this: (gdb) info address arglen Symbol "arglen" is a variable in register eax. or maybe this: Symbol "gdb_use_lsb" is static storage at address 0x815e720