From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26135 invoked by alias); 4 Nov 2007 17:35:16 -0000 Received: (qmail 26092 invoked by uid 22791); 4 Nov 2007 17:35:15 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 04 Nov 2007 17:35:11 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C2F192AB9C9; Sun, 4 Nov 2007 12:35:09 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3c6MkYUgdWgP; Sun, 4 Nov 2007 12:35:09 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id CA3852AB9B3; Sun, 4 Nov 2007 12:35:08 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9AF6AE7ACA; Sun, 4 Nov 2007 12:35:06 -0500 (EST) Date: Sun, 04 Nov 2007 17:35:00 -0000 From: Joel Brobecker To: Rob Quill Cc: gdb@sourceware.org Subject: Re: Tests for expressions Message-ID: <20071104173506.GA6729@adacore.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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-11/txt/msg00028.txt.bz2 > I was wondering if anyone knew of a test in the test suite which tests > GDB's evaluation of expressions. I am trying to understand all of the > cases for the switch statement in the switch statement in > evaluate_subexp_standard in ./gdb/eval.c and thought that looking at > how the testsuite uses them would be a good place to start. Any "print" command will use the expression evaluation routine. I find it harder to understand the evaluation routine without having a look at expression.h (for the expression "tree"), and the associated parsing routine. See c-exp.y, that shows how the expression tree is built, will show you what data is where in each node depending on the node kind. -- Joel