This is the mail archive of the
mailing list for the GDB project.
Re: catchpoint - bptype
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 28 Apr 2008 09:21:09 -0700
- Subject: Re: catchpoint - bptype
- References: <email@example.com>
> I see that bp_catch_catch and bp_catch_trhow were removed in Dec. 2007 and
> this confuses me a bit: what is the intention? To get rid of all
I haven't looked at the implementation of the other catchpoints, but
when I implemented Ada exception catchpoints, I really appreciated
the new infrastructure which allowed me to use bp_breakpoint instead
of having to add my own new bp_catchpoint enums (I tried the latter
first). It allowed me to basically implement the functionality in
a couple of functions instead of littering "case bp_catchpoint_exception..."
everywhere in breakpoint.c.
I am not sure about the long term intentions in this area. I think
that the new approach based on breakpoint_ops can be extremely effective,
but that assumes that the functionality is in fact implemented using
an underlying breakpoint, regardless of the architecture. Catchpoints
on fork or exec events, for instance, are not in this category,
and thus require their own bp_ enum kind.
> Since bptype is used to give more specific detail about a breakpoint it
> makes sense to have bp_catch_catch and bp_catch_throw there. It would also
> make those two catchpoints first-class citizens again.
I don't understand why you think that not having their own bp_catch
enum makes them less equal than the others. Like I said above, it
certainly made the implementation more compact and easier to maintain.
At the user level, I don't think he's seeing much of a difference either.