From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29028 invoked by alias); 6 Dec 2013 14:20:45 -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 29018 invoked by uid 89); 6 Dec 2013 14:20:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ea0-f169.google.com Received: from Unknown (HELO mail-ea0-f169.google.com) (209.85.215.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 06 Dec 2013 14:20:43 +0000 Received: by mail-ea0-f169.google.com with SMTP id l9so340251eaj.0 for ; Fri, 06 Dec 2013 06:20:34 -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=NRADNcV9MBCqu+CwSlXVIiATQ+KCYXzlv3Togq74+b0=; b=JI6SPo3fCrDKNrN2tA+p9MgPHAuGcFKMPeCh6VqlEnDdIOyiCrxMFOGO+sj/d7Vegq FaoZrOrjzi2qX3qpYXzgtZf46xgDpKpzE7wJRLuPr2gqrxbcJBRk/O30dPHqZ1WGu3O/ WOW8/w9U8y6XIUptl+KIa/qUzPsF+XqCPSzb6ddVQ9pskOX7HHtlc5YRqvlj5e1F0Wh5 3BuYPKIpaGBtt5vj5Ad4fQP4Ug2HKkYuRjn0ee8Kyj5TdWpyk2OX5Xdenm1d0g8dbLIS x2lU8VQjYttMD0IcWSJGHW+ZxjLGYQmulNCfe40mcQS3v/s7NfG078XkHevmVIn563xK 1qcQ== X-Gm-Message-State: ALoCoQlAfay3NmTyWiC6/rvAsd0zPvPnkXxji1Rb88vHuADFFW0qafw9xCaqSDv4UWSzOk3lUU2O7N4+dRN68LqlYv+e55m0LnZ1NGKPwlPPTtu4b22azDP41OXFR0UBRLZUlDC4g8ci/mJ8yh/eHzDDf6WEn7UER9yj8kEyAldh3KbAD6z8E4ktyY+l2+rIuDjxqWVDTuMI2YxxV4VsPd2SCRxz3Ftf/A== MIME-Version: 1.0 X-Received: by 10.14.5.12 with SMTP id 12mr2853270eek.9.1386339634636; Fri, 06 Dec 2013 06:20:34 -0800 (PST) Received: by 10.14.151.72 with HTTP; Fri, 6 Dec 2013 06:20:34 -0800 (PST) In-Reply-To: References: Date: Fri, 06 Dec 2013 14:20:00 -0000 Message-ID: Subject: Re: [RFC/Patch] Call overloaded operators to perform valid Python operations on struct/class values. From: Siva Chandra To: Doug Evans Cc: gdb-patches Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00246.txt.bz2 Thanks for taking a look Doug. I will address the nits if there is interest in getting this in. On Thu, Dec 5, 2013 at 10:24 PM, Doug Evans wrote: > It feels sexy and all, but it's not clear to me going this path is a net win. > If we could release it as experimental, without any promises to keep it > or change it in incompatible ways, I'd say go for it. > I'm curious what others think. My main motivation to have something like this has been to aid implementing "debug methods" that I have in my other patch. Same can be said about non-operator methods as well, but clearly, allowing methods to be invoked via the '.' operator on gdb.Value objects is bad. I could not think of any reason why it could be bad to not allow operators. Thanks, Siva Chandra PS: For methods in general, I have ideas on how we can facilitate calling them from Python. But, it is probably premature at this point to talk about it if we have not yet decided about how "debug methods" feature would eventually look like.