This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Sérgio Durigan Júnior <sergiodj at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 2 Oct 2008 14:12:56 -0700
- Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part
- References: <1222798409.30389.23.camel@miki>
> * 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