This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] python/19506 -- gdb.Breakpoint address location regression
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 27 Jan 2016 15:36:16 +0000
- Subject: Re: [PATCH] python/19506 -- gdb.Breakpoint address location regression
- Authentication-results: sourceware.org; auth=none
- References: <1453413926-24995-1-git-send-email-keiths at redhat dot com>
On 21/01/16 22:05, Keith Seitz wrote:
> When the locations API was committed, it assumed that all valid > arguments to the gdb.Breakpoint command were a linespec (aside from > keywords describing 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_event_location. This new function only handles address and > linespec locations. I have made no attempt to fully implement explicit > locations. > > This patch fixes python/19506: > > (gdb) python gdb.Breakpoint("*main") > Traceback (most recent call last): > File "<string>", line 1, in <module> > RuntimeError: Function "*main" not defined. > Error while executing Python 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_event_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