From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32235 invoked by alias); 13 Nov 2014 03:00:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32226 invoked by uid 89); 13 Nov 2014 03:00:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f179.google.com Received: from mail-ob0-f179.google.com (HELO mail-ob0-f179.google.com) (209.85.214.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 13 Nov 2014 03:00:46 +0000 Received: by mail-ob0-f179.google.com with SMTP id m8so10189036obr.38 for ; Wed, 12 Nov 2014 19:00:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SBwwpkJP7oQNq57WqrbQxb2uDXuxDRYk6TorVnCAlVs=; b=Dk1q08r49ZGWgTA1MGfjbRqIfqb6j0GXUT4vKK7wUpB54ZcLfb/7XnYypo1mlRS47Y zomuxGbxeIjZ7gzjVsDMyo+3sgBZG+ljJyJLWnciPgBhExze5H9DqqJsV7qbD0CjsX/w 4R8AWM+pVFzJ8cfNAIu74lsCQjbk+4zOeQJJO9Yi74R6YTrPwON5fzd2FzU66Wz2m3JH pqgED2GWoqZLqUJQyav2ttt309ZXUUZN2OHKbemksVVoexTB27dxA8ogWRhMwDevYOPW gNxYv9WTNh/GsOViyr0qFmEdQyrRGojX4uP7i3SfRbzp2UOu1hTaQFcs1bNz/9dBKOlt H97Q== X-Gm-Message-State: ALoCoQlvPWFdGRxzSkHN5Wk8PD7IEsXXKR5vr5ko8raFOyw4gukjQkiOwHb+s8cSRoXljTBLZtO7 MIME-Version: 1.0 X-Received: by 10.60.161.115 with SMTP id xr19mr41643557oeb.8.1415847644189; Wed, 12 Nov 2014 19:00:44 -0800 (PST) Received: by 10.202.137.1 with HTTP; Wed, 12 Nov 2014 19:00:44 -0800 (PST) In-Reply-To: References: <201411111521.sABFLAQ5008463@d03av02.boulder.ibm.com> Date: Thu, 13 Nov 2014 03:00:00 -0000 Message-ID: Subject: Re: [PATCH v4] Make chained function calls in expressions work From: Siva Chandra To: Doug Evans Cc: Ulrich Weigand , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00231.txt.bz2 On Wed, Nov 12, 2014 at 8:08 AM, Doug Evans wrote: > On Tue, Nov 11, 2014 at 7:21 AM, Ulrich Weigand wrote: >> [...] >> The most cleanly "correct" solution would probably be to cache the temporaries >> on the *dummy frame*, because that is the frame associated with all the >> GDB-generated content on the stack, and the dummy_frame struct does persist >> a bit longer than the frame struct. However, getting there would still be >> a bit more difficult, since we'd first have to arrange for a dummy frame to >> persist over multiple inferior call invocations. Currently, the dummy frame >> is automatically popped in infrun as soon as the call returns. > > Hi. > OOC, Could one do a quick pass over the parsed expression to first see > if there are any function calls, and if so wrap the entire expression > evaluation in a routine that manages the creation/cleanup of an > "outer" dummy frame? If I understand you correctly, isn't the general direction of the proposed solution already this? It differs in the fact that the "outer" frame is adjusted as required by the expression instead of "fixing" it before the evaluation of the expression. The notion of an "outer" frame is not explicitly present though.