From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17864 invoked by alias); 18 Jun 2010 18:04:48 -0000 Received: (qmail 17818 invoked by uid 22791); 18 Jun 2010 18:04:47 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jun 2010 18:04:42 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5II4fjo027736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Jun 2010 14:04:41 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5II4eW9013332; Fri, 18 Jun 2010 14:04:40 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5II4drD015702; Fri, 18 Jun 2010 14:04:40 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id AAB3337814A; Fri, 18 Jun 2010 12:04:39 -0600 (MDT) From: Tom Tromey To: Phil Muldoon Cc: gdb-patches ml Subject: Re: [python][patch] Inferior and Thread information support. References: <4BFA6E82.3070704@redhat.com> <4C1B16BF.3040000@redhat.com> Reply-To: tromey@redhat.com Date: Fri, 18 Jun 2010 18:04:00 -0000 In-Reply-To: <4C1B16BF.3040000@redhat.com> (Phil Muldoon's message of "Fri, 18 Jun 2010 07:48:31 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2010-06/txt/msg00415.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> +int Phil> +search_memory (CORE_ADDR *start_addr, ULONGEST *search_space_len, Phil> + const char *pattern_buf, ULONGEST pattern_len, Phil> + CORE_ADDR *found_addr) I think if you remove the max_count parameter then you won't need this at all, you can just call target_search_memory directly. Phil> +struct inflist_entry { Phil> + inferior_object *inf_obj; Phil> + struct inflist_entry *next; Phil> +}; [...] Phil> +/* List containing inferior_objects. This list owns a reference to each Phil> + object it contains. */ Phil> +static struct inflist_entry *gdbpy_inferior_list; Phil> + Phil> +static int ninferiors; I'm sorry I missed this earlier... struct inferior now has a "user-data" API, like objfiles do. See register_inferior_data and register_inferior_data_with_cleanup. I think this means that we can attach the Python objects directly to the struct inferior, rather than keeping an external list. This change should simplify a lot of code. Tom