From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16319 invoked by alias); 8 Dec 2011 13:08:57 -0000 Received: (qmail 16260 invoked by uid 22791); 8 Dec 2011 13:08:56 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Thu, 08 Dec 2011 13:08:43 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pB8D8gIm023225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Dec 2011 08:08:42 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pB8D8fCw022591; Thu, 8 Dec 2011 08:08:41 -0500 From: Phil Muldoon To: Kevin Pouget Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Add bp_location to Python interface References: Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Thu, 08 Dec 2011 13:39:00 -0000 In-Reply-To: (Kevin Pouget's message of "Thu, 8 Dec 2011 10:25:54 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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: 2011-12/txt/msg00262.txt.bz2 Kevin Pouget writes: > Hello, > > I would like to discuss this patch which introduces a new Python class > gdb.BpLocation, mapped from breakpoint.h::struct bp_location. Thanks. > I noticed that the Python interface doesn't offer so many details > about breakpoint location, just gdb.Breakpoint.location, the string > used to set the breakpoint (its linespec?) Because we use gdb.Breakpoints for watchpoints as well, it also represents the expression used to set the watchpoint. > So this new class, which is currently strictly read-only and not > instantiatable, exports the address and inferior in which the > breakpoint was set (and an enabled flag, and a link to its owner > breakpoint). I think it should only ever be read-only. > BpLocation object are available through the gdb.Breakpoint.locations method. If a user expected a string for a location, delivering ab object here would break API? > I think that this class would also help Python users to better > control/understand where their breakpoints are set with Tom's recent > changes about ambiguous linespec Yes I think so too. Cheers, Phil