From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1722 invoked by alias); 16 Nov 2013 00:54:04 -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 1711 invoked by uid 89); 16 Nov 2013 00:54:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_05,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ea0-f174.google.com Received: from Unknown (HELO mail-ea0-f174.google.com) (209.85.215.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 16 Nov 2013 00:54:02 +0000 Received: by mail-ea0-f174.google.com with SMTP id j14so158543eak.33 for ; Fri, 15 Nov 2013 16:53:53 -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=XzP/86nW3QQmKXi5shP5V0S5JrLn6zNKTg3kOMQvaTg=; b=OU7ubFbXrVHl8duNQQb7nVfCW94RpBv72qQOnkKqpqzC6sux1yYG8omI+H5q3O8jXp guanzwPe8T1Mi+BpSnZW3yHMuGUXVjvMj2RcvCKAErwu3HA/5GvAcV8l3kjxb5g08Z5t jA5ChK7ji1NcERJZ272HBUlwrcODF1vJIP61QeUAtcTvsVftNMLvw4ee1VpS/O4Qq1Gx LB/jfWMItpWjylwG3RDJFt9kpjd/b7nGu/NX9mxAT8cD/D99mMG1BFGN6jB7Zm6146hb sjfm4n7mmv9Qs/GRq7r37pV+LYgykcDROYYR6oGw2t9v2M9KJkbE/uEDoFWc9z7SElf6 4DNQ== X-Gm-Message-State: ALoCoQkRYQywRv6Enl5gz5ZcRxT4xW9Sum9as3CzACV1ut+WFXEZjOXIA14VKUMPlgdLeaX3v3c5hOOv+IPcTc/WqhCOGq0f7eba3tMwD8eJj2IbXc4VwHAw/yOg66IopGDh48H/RPKrO6zz+m8QepSy0bAP6JR2cuowLX7HRjsayKOPAuEg8FDB1lY6JIH1n8wmKMP/uambmYu40zgoco6if7TFD0BpoA== MIME-Version: 1.0 X-Received: by 10.14.223.3 with SMTP id u3mr2096079eep.138.1384563233618; Fri, 15 Nov 2013 16:53:53 -0800 (PST) Received: by 10.15.52.133 with HTTP; Fri, 15 Nov 2013 16:53:53 -0800 (PST) In-Reply-To: References: <87r4hefx59.fsf@fleche.redhat.com> <871u995pbt.fsf@fleche.redhat.com> <87ehaq5nkr.fsf@fleche.redhat.com> <87txfds4vf.fsf@fleche.redhat.com> Date: Sat, 16 Nov 2013 01:03:00 -0000 Message-ID: Subject: Re: [RFC] Debug Methods in GDB Python From: Siva Chandra To: Doug Evans Cc: Tom Tromey , gdb-patches Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00434.txt.bz2 On Fri, Nov 15, 2013 at 4:05 PM, Doug Evans wrote: > It would be good to provide enable/disable/info support akin the the > python pretty-printers. Yes. I am planning to bring them in the next version of the patches. > The original pretty-printers used regexps for matching but that was > IIUC found to be excessively general. > We might want to avoid them in the basic versions of debug methods. Do you have an alternate approach in mind? > I could be wrong but it seemed like errors were handled differently > than in the pretty-printers. > The inconsistency doesn't feel warranted. Yes, there is a difference. > IIRC the "ext_lang" stuff was going to be deleted, right? I am not sure. Tom had a comment long time back on this, but his latest review said that his comments on this might be irrelevant now. I have renamed some of the pieces related to this in my last patch. Do you have any specific comments? > What are debug method groups for? They are for disabling and enabling a group of debug methods. For example, they could be used for debugging the debug methods themselves or writing tests for them: You can disable a group at once instead of disabling individually. > One thought I had, and this is mostly for discussion's sake, > is why stop at providing support for user-defined methods (incl. operators)? > Why not allow anything that might be "hand called" to be implemented in Python? I think that could be a fairly straightforward extension. Do you want it to be done together with this work? > [One way of implementing user-defined methods/operators was to > translate, e.g. my_stl_vector[3], into a "pseudo- hand call", > and then call into Python at the point where we would have hand-called > the inferior instead.] IIRC, you had suggested similar ideas earlier as well. However, I have not gone that route because I thought debug methods/functions should go through the method/function matching infrastructure. Am I missing something here?