This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: catchpoint - bptype


> 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 
> bp_catch_*? 

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.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]