This is the mail archive of the gdb-patches@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: [commit/Ada] Special handling for predefined exceptions...


> > For Ada, we provide a command "catch exception [EXCEPTION_NAME]"
> > that stops the execution when an exception is raised. If an exception
> > name is specified in the command, then the debugger only stops when
> > a specific exception is raised.  The matching of the exception is
> > performed through an internal condition that looks like this:
> > 
> >     long_integer (e) = long_integer (&EXCEPTION_NAME)"
> > 
> > (where "e" is a parameter of the function where we inserted the
> > catchpoint that contains a pointer to the exception data).  The way
> > it works is: For every EXCEPTION_NAME, the compiler defines an entity
> > whose name is EXCEPTION_NAME (fully qualified). So when we want to
> > verify whether we have raised a given exception, we just verify that
> > its address is the address of the symbol whose name is EXCEPTION_NAME.
> 
> I'd love to have all this info somewhere in gdbint.texinfo.

I will oblige, if that's what you would like, but I would much, much,
rather put that in the code where it is easy to keep it synchronized
with the actual implementation.

I looked at the current gdbint.texinfo, and I think it would really
benefit from a section that explains how breakpoint_ops can be used
to implement specialized kinds of breakpoints like the Ada exception
catchpoints.  But this tiny extremely specific piece, IMO, belongs
with the code.

I guess we go back to the discussion of how much detail we want to
put in gdbint.texinfo.  I don't want to restart this dicussion, as
I think most people have their own opinion and all of them are fair.

Your call.

-- 
Joel


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