This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add visible flag to breakpoints.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: pmuldoon at redhat dot com
- Cc: gdb-patches at sourceware dot org, dan at codesourcery dot com
- Date: Fri, 8 Oct 2010 14:35:14 +0100
- Subject: Re: [patch] Add visible flag to breakpoints.
- References: <m38w2j72jd.fsf@redhat.com> <201009301741.32379.pedro@codesourcery.com> <m3lj68svad.fsf@redhat.com>
On Friday 08 October 2010 13:50:34, Phil Muldoon wrote:
> The @var{internal} argument has no effect with watchpoints.
Should it be an error instead (or made to work)?
The non-python bits looked fine. I'd prefer Tom or someone
else to look and approve those. I did notice:
> #define BPPY_REQUIRE_VALID(Breakpoint) \
> do { \
> - if (! bpnum_is_valid ((Breakpoint)->number)) \
> + if (Breakpoint == NULL) \
> return PyErr_Format (PyExc_RuntimeError, _("Breakpoint %d is invalid."), \
> (Breakpoint)->number); \
'(Breakpoint)->number' when Breakpoint is NULL is not going to work.
Also, missing ()s:
if ((Breakpoint) == NULL)
I would also suggest using a VEC for the breakpoints instead
of a linked list.
(Also, the old code appeared to have been designed for O(1) access to
the python breakpoint objects given a breakpoing number: I have no
clue it if that matters but you could preserve that easily with two
VECs or bppy_breakpoints arrays.)
--
Pedro Alves