From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17346 invoked by alias); 12 Nov 2014 16:08:58 -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 17333 invoked by uid 89); 12 Nov 2014 16:08:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 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-vc0-f171.google.com Received: from mail-vc0-f171.google.com (HELO mail-vc0-f171.google.com) (209.85.220.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 12 Nov 2014 16:08:56 +0000 Received: by mail-vc0-f171.google.com with SMTP id id10so2313391vcb.16 for ; Wed, 12 Nov 2014 08:08:54 -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=xbqkmojJOVUtYbSPXTy//zYZ3DUSlQgnKyTJXBdKgKo=; b=lE6isF6QO+j95SdNKkel+ZEfZX44gXHuam0x+LdyX9HBjDOCNs8aTwb9k/MnRMtom5 bSorNF5aZy87lE1XwnlNQyVMGc016ZDnfikzwWpIlukkI7vgkZ3hxPemvpqYVh9RuzXb 6Ilj7unxl9KUG0jqd0CLX13mV8HYtcKFqf1+bCod4ywiiUquWeuopHUU6E57epymoonk KbcCZcJAr9rqzbRyJDVojhadYOMbP2q9ss9R9I9BtVhUeTVcxanqGhYVYzZFICxZN33J oJf0ZifhIBqOxHbrL5sxt+LuDbo0fVdvXCTadqxPaz9ph1Az8XFTBvORoagJNjXoqXxO ogCg== X-Gm-Message-State: ALoCoQm1Ff+CbG3fOhZuRSdc7QXUfahntgsDrzuN2DjryThO2Xc1fzc71F9ZKGAG/QeliZpTiIDt MIME-Version: 1.0 X-Received: by 10.52.111.202 with SMTP id ik10mr12329154vdb.48.1415808534431; Wed, 12 Nov 2014 08:08:54 -0800 (PST) Received: by 10.52.114.101 with HTTP; Wed, 12 Nov 2014 08:08:54 -0800 (PST) In-Reply-To: <201411111521.sABFLAQ5008463@d03av02.boulder.ibm.com> References: <201411111521.sABFLAQ5008463@d03av02.boulder.ibm.com> Date: Wed, 12 Nov 2014 16:08:00 -0000 Message-ID: Subject: Re: [PATCH v4] Make chained function calls in expressions work From: Doug Evans To: Ulrich Weigand Cc: Siva Chandra , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00220.txt.bz2 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? One catch is that if all calls end up being xmethod calls then we won't need the dummy frame. I'm not sure if there'd be any real harm in setting one up though.