From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4747 invoked by alias); 8 Jan 2014 00:49: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 4738 invoked by uid 89); 8 Jan 2014 00:49:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 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-ee0-f53.google.com Received: from mail-ee0-f53.google.com (HELO mail-ee0-f53.google.com) (74.125.83.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 08 Jan 2014 00:49:02 +0000 Received: by mail-ee0-f53.google.com with SMTP id b57so373857eek.40 for ; Tue, 07 Jan 2014 16:48:59 -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=PX4ce2PGHAi/yghWAWEbQDR4WOQYXyYdHq7/HE8WoQ8=; b=hSi9jk61Jr91liG36nv3vmAFmty3bcmiRaDQKnxR9yJIH0O1AYKMpIcL44lWLcvmzY aYqXxskOgVmw9fhUfnqW61o9gZHSEyF5x2jbpGTBor5SsxZUp/iUE8Gc4Xtwl3dkLT11 vzaLXIXhjroEs5Fy1uGBsCPsvbN7YaXao8TrmGh5ZhZ4gUCMLBcEAKzn8TK8x21Lkfqc Lz7LuiSPUH1M5KtN6i4GvAMhuXgJI8l/fwYzJn0ChUCMCotvin08w8S15yb+ThxXh1QQ CbpSBzBJtLkBwL218gXEfa56MLdTi8wkeAr8Q5KNomtyd7nzY5OV1FF+cwbn3feY0+Qj XvYA== X-Gm-Message-State: ALoCoQnPRtzR7T14fqzW9ZHZKyGX32GXUldqgIEOuxdGT+VKl+Mvnw/zylErAxmDeKu4wCTS8X5MnVj9uX3R8oBgHGA5tE28iZUl7lLQivLsD3xlUfyM3D5g0SP5QASA1sTEZO4IMwcB2iFEfOoy3nXb1Pc3zquE7Xn4lJemGxngAZRbPYKMzGvocqBV8tZ5FZznLoKYCTqwWwrbCYV1iC2mhLKiKN3oFQ== MIME-Version: 1.0 X-Received: by 10.14.251.68 with SMTP id a44mr24673603ees.64.1389142139607; Tue, 07 Jan 2014 16:48:59 -0800 (PST) Received: by 10.14.151.72 with HTTP; Tue, 7 Jan 2014 16:48:59 -0800 (PST) In-Reply-To: References: Date: Wed, 08 Jan 2014 00:49:00 -0000 Message-ID: Subject: Re: [PATCH] Debug Methods in GDB Python From: Siva Chandra To: Doug Evans Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00170.txt.bz2 I am assuming you have not prescribed anything here, but are only presenting pros of doing things in a certain way. I am also assuming that you are waiting for others to chime in with their views. On Fri, Jan 3, 2014 at 10:52 AM, Doug Evans wrote: > I like having the object gdb calls to do the lookup return another > object that gdb calls to implement the functionality. > > 1) It supports more flexibility in how the user can organize things > (e.g., one "lookup" object can handle different "worker" objects). For doing such things, I had a design like this in mind: We setup up a hierarchy of DebugMethod classes. The base class only does type and method matching. The derived concrete classes extend the base class by adding arg matching and the method invocation. This way, 'lookup' and 'worker' functionalities are separated code wise but still encapsulated in a single DebugMethod object. > 2) The worker object can obtain state at runtime (it is constructed at > lookup time). This can be done on a single object by providing a setter?