From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76327 invoked by alias); 27 Jan 2016 15:36:20 -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 76315 invoked by uid 89); 27 Jan 2016 15:36:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=overlooked, proceeding, sk:py-brea, sk:pybrea X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 27 Jan 2016 15:36:19 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 3177019F98E for ; Wed, 27 Jan 2016 15:36:18 +0000 (UTC) Received: from [10.36.112.35] (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0RFaGgb016118; Wed, 27 Jan 2016 10:36:17 -0500 Subject: Re: [PATCH] python/19506 -- gdb.Breakpoint address location regression To: Keith Seitz , gdb-patches@sourceware.org References: <1453413926-24995-1-git-send-email-keiths@redhat.com> From: Phil Muldoon Message-ID: <56A8E3F0.3080807@redhat.com> Date: Wed, 27 Jan 2016 15:36:00 -0000 MIME-Version: 1.0 In-Reply-To: <1453413926-24995-1-git-send-email-keiths@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00671.txt.bz2 On 21/01/16 22:05, Keith Seitz wrote: > When the locations API was committed, it assumed that all valid > argumen= ts to the gdb.Breakpoint command were a linespec (aside from > keywords des= cribing various breakpoint properties). However, address > locations are a= separate class of locations which were overlooked by my > patch. > > This = patch introduces a new function analogous to the CLI function > string_to_e= vent_location. This new function only handles address and > linespec locat= ions. I have made no attempt to fully implement explicit > locations. > > = This patch fixes python/19506: > > (gdb) python gdb.Breakpoint("*main") > T= raceback (most recent call last): > File "", line 1, in = > RuntimeError: Function "*main" not defined. > Error while executing Pytho= n code. > > Now: > > (gdb) python gdb.Breakpoint("*main") > Breakpoint 1 at= 0x4005fb: file ../../../src/gdb/testsuite/gdb.python/py-breakpoint.c, line= 32. > > gdb/ChangeLog > > * python/py-breakpoint.c (python_string_to_e= vent_location): New > function. > (bppy_init): Use python_string_to_event_location instead of > new_linespec_location. > >= gdb/testsuite/gdb.python > > * gdb.python/py-breakpoint.exp (test_bkpt= _address): New proc. > (toplevel): Call test_bkpt_address. It looks fine to me, Keith, beyond the further musings of linespec that follows earlier in the thread and you end up proceeding in this direction. Cheers Phil