This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFA] breakpoint.c: don't generate bp events for internal bps


On Fri, 11 May 2001, Eli Zaretskii wrote:

> > Do the words "it's stupid" mean anything to you?
>
> I looked them up ;-)

Touche!

> > From gdb-events.h:
> >
> > /* User Interface Events.
> >    Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
> >
> > "User Interface Events". User interfaces don't care about internal
> > breakpoints -- only user-set breakpoints. IMO all of the breakpoints
> > excluded from the event trigger are BACKEND breakpoints, and they should
> > not ever be exposed to users (or non-backend code).
> >
> > If someone writing ui code needs to know about internal breakpoints, he
> > doing something wrong.
>
> Sorry, I still don't get the relevance of this to what I asked.
> Perhaps I'm stupid.

No, I'm not explaining myself properly... Let me try again:

breakpoint_delete_event, breakpoint_create_event, and
breakpoint_modify_event are defined in gdb-events.[ch],sh. They are, as
the comments from the files explain, for user interface events.

Well, it is my contention that user interfaces need not (indeed, should
not) know anything about bp_none, bp_until, bp_finish, bp_longjmp,
bp_longjmp_resume, bp_step_resume, bp_through_sigtramp,
bp_watchpoint_scope, bp_call_dummy, bp_shlibevent, bp_thread_event,
bp_catch_unload, bp_catch_fork, bp_catch_vfork, bp_catch_exec,
bp_catch_catch, and bp_catch_throw breakpoint events (or some major subset
of these). What libgdb does for its own housekeeping is its business, and
its business alone. Breakpoints of these types are PRIVATE to gdb.

(I suspect this isn't helping too much, is it?)

I would even go further to argue with Fernando that we need to eliminate
modify_breakpoint_hook, delete_breakpoint_hook, and
create_breakpoint_hook, because these are not hooks: they are events. We
already have an event-reporting mechanism. Let people use it. :-)

I'm in the mood for making friends today! O:-)
Keith



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