public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>
Subject: [PATCH 0/2] Separate syscall catchpoint code from gdb/breakpoint.c
Date: Tue, 10 Mar 2015 23:28:00 -0000	[thread overview]
Message-ID: <1426030105-15485-1-git-send-email-sergiodj@redhat.com> (raw)

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?

             reply	other threads:[~2015-03-10 23:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 23:28 Sergio Durigan Junior [this message]
2015-03-10 23:28 ` [PATCH 2/2] Create gdb/break-catch-syscall.c Sergio Durigan Junior
2015-03-11 11:32   ` Yao Qi
2015-03-11 18:15     ` Sergio Durigan Junior
2015-03-10 23:28 ` [PATCH 1/2] Implement breakpoint_find_if Sergio Durigan Junior
2015-03-11 11:22   ` Yao Qi
2015-03-11 18:18     ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426030105-15485-1-git-send-email-sergiodj@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).