From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32654 invoked by alias); 11 Nov 2014 17:05:54 -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 32636 invoked by uid 89); 11 Nov 2014 17:05:52 -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-f178.google.com Received: from mail-ob0-f178.google.com (HELO mail-ob0-f178.google.com) (209.85.214.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 11 Nov 2014 17:05:47 +0000 Received: by mail-ob0-f178.google.com with SMTP id vb8so7640420obc.23 for ; Tue, 11 Nov 2014 09:05:45 -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=vXm+7WSBomdBqOcDilj2lGQf19RMol6Y/gk59CC/XzY=; b=IJiiKoawx4zRnrdkdwvcHXntJPCXZQS1UidvSP9NXpRV3WUG5FC89oX0LDCdljJSmL ydejzU1DO0/zcPdBSg2lQz+w44S1f5evAjIJGZZSDO/FJWiLm5mNAs7hxxW0ShwAs+K3 w60lB8pm8OidZJTTJRBmFK2ml5Zft/xoXUNSsrNt3kggGpaPJOwLEAMqoWt73thWMaUz TEH4JIBGNYBgRpwyHE+r3CA0aNrR1BjH7TLmTmVXbCPw3avmksEgrzut80Ylr46n2UPb SCyk/pRdjd9u5v0iqdRY1POxeCPVXEB/7l2Z81dceVw4aa30EmFB2aebSpevlOm214i5 atZw== X-Gm-Message-State: ALoCoQkYzSmT0fjHfhWC2OjQg8dzj9zo70Dghy+Ga8DIPkZPIyIk/3IsuRk7j4jnnO7ycRw7mnJn MIME-Version: 1.0 X-Received: by 10.182.252.225 with SMTP id zv1mr29034460obc.37.1415725545764; Tue, 11 Nov 2014 09:05:45 -0800 (PST) Received: by 10.202.137.1 with HTTP; Tue, 11 Nov 2014 09:05:45 -0800 (PST) In-Reply-To: <201411111521.sABFLAQ5008463@d03av02.boulder.ibm.com> References: <201411111521.sABFLAQ5008463@d03av02.boulder.ibm.com> Date: Tue, 11 Nov 2014 17:05:00 -0000 Message-ID: Subject: Re: [PATCH v4] Make chained function calls in expressions work From: Siva Chandra To: Ulrich Weigand Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00188.txt.bz2 On Tue, Nov 11, 2014 at 7:21 AM, Ulrich Weigand wrote: > No, please go ahead and ask questions; it's always better to hash the > main direction out before spending a lot of time on implementating > something ... :-) This time I am really done :) Thanks for taking time to explain things to me. I am just putting down my point of view as to why I am still looking for the correct approach, and after all your explanations, I am now convinced that the thread approach is the best. One other place where chained function calls can happen is in Python for example. If val1, val2 and val3 are gdb.Value objects of type std::string, and if we have val1 + val2 in Python code, then overloaded operator+ is invoked. However, if we have val1 + val2 + val3, it will fail currently as this is also a chained function call. We could perhaps do the 'setup' and 'cleanup' in ensure_python_env as well (just as we want to do in evaluate_expression or evaluate_subexp). I do not want to hold up the current work in relation to this. We can discuss this probably as a separate topic.