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: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part


> 	* breakpoint.h (enum bptype): Add syscall catchpoint and entry
> 	breakpoint types.
> 	(struct breakpoint): Add field 'syscall_number' (used to know
> 	which syscall triggered the catchpoint) and
> 	'syscall_to_be_caught' (used to know which syscall we are trying
> 	to catch).

I would really like to try to avoid creating a different enum for
each catchpoint type, if we can.  See for instance how I implemented
Ada exception catchpoints:

    http://www.sourceware.org/ml/gdb-patches/2007-01/msg00102.html

Do you think we could leverage on the "breakpoint_ops" structure
to implement this feature? Daniel, you know this part of the code
really well, what do you think?

Obviously, his feature is a different kind of beast than Ada exception
catchpoints (which behind the scene is just an elaborated breakpoint).
So he won't be able to use the bp_breakpoint kind I used. Actually,
I don't see any bptype kind that could be used, so we'll have to create
one, but if the name could be generic enough to be used in other
circumstances.

Similarly, the breakpoint_ops structure might need to be extended 
a bit, to provide methods that would insert/remove the catchpoint.

-- 
Joel


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