This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add bp_location to Python interface
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Kevin Pouget <kevin dot pouget at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 08 Dec 2011 13:08:41 +0000
- Subject: Re: [PATCH] Add bp_location to Python interface
- References: <CAPftXUL7Gag8pOzh6NF2t=nowBgSYa_Je3CkMQHgxexrNz+OHg@mail.gmail.com>
- Reply-to: pmuldoon at redhat dot com
Kevin Pouget <kevin.pouget@gmail.com> 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