This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/2] Separate syscall catchpoint code from gdb/breakpoint.c
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Tue, 10 Mar 2015 19:28:23 -0400
- Subject: [PATCH 0/2] Separate syscall catchpoint code from gdb/breakpoint.c
- Authentication-results: sourceware.org; auth=none
Hi there,
This simple series is a "technical debt" that is being paid now. It
creates a new file, gdb/break-catch-syscall.c, and moves code related
to syscall catchpoint from gdb/breakpoint.c to the new file. I think
everybody will agree that gdb/breakpoint.c is huge, so I think every
kind of cleanup that can be made is welcome.
The first patch in the series implements a new function,
breakpoint_find_if, which is needed by the 'catch syscall' command.
It needs to iterate through the list of existing breakpoints, and the
only way (so far) is to use the ALL_BREAKPOINTS* macros. Now, one can
use this new function, which is modeled after BFD's
bfd_sections_find_if, to do that task. More explanation on the patch.
The second patch is the code movement itself. It is totally trivial;
the only bit that I had to modify was the function that used
ALL_BREAKPOINTS; now it is using the new breakpoint_find_if.
I tested the patch by running the 'catch syscall' testcase, and
everything is passing.
OK to apply?