Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] breakpoint always inserted in record target
Date: Thu, 12 Apr 2012 05:16:00 -0000	[thread overview]
Message-ID: <CADPb22TUoy36W5JoViOptaooWK=RnjL+u-9d4tDidSxg9iCOdg@mail.gmail.com> (raw)
In-Reply-To: <1334149619-2738-1-git-send-email-yao@codesourcery.com>

On Wed, Apr 11, 2012 at 6:06 AM, Yao Qi <yao@codesourcery.com> wrote:
> 2012-04-11  Yao Qi  <yao@codesourcery.com>
>
>        * breakpoint.c (iterate_over_bp_locations): New.
>        * breakpoint.h: Declare.
>        * record.c (record_open): Call record_init_record_breakpoints.
>        (record_sync_record_breakpoints): New.
>        (record_init_record_breakpoints): New.
> ---
>  gdb/breakpoint.c |   13 +++++++++++++
>  gdb/breakpoint.h |    2 ++
>  gdb/record.c     |   30 ++++++++++++++++++++++++++++++
>  3 files changed, 45 insertions(+), 0 deletions(-)
>
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index be536bc..c5109d6 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -2425,6 +2425,19 @@ insert_breakpoints (void)
>     insert_breakpoint_locations ();
>  }
>
> +/* Invoke CALLBACK for each of bp_location.  */
> +
> +void
> +iterate_over_bp_locations (void (*callback) (struct bp_location *))
> +{
> +  struct bp_location *loc, **loc_tmp;
> +
> +  ALL_BP_LOCATIONS (loc, loc_tmp)
> +    {
> +      callback (loc);
> +    }
> +}

Hi.
Nit: Functions that take callbacks generally also take a void* to pass
to the callback.

Plus, can you write a testcase?


  parent reply	other threads:[~2012-04-12  4:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 13:16 Yao Qi
2012-04-11 18:15 ` Keith Seitz
2012-04-13  2:03   ` Yao Qi
2012-04-13  9:47     ` Eli Zaretskii
2012-04-13 16:00     ` Pedro Alves
2012-04-23  6:57       ` Yao Qi
2012-04-24 13:18         ` Pedro Alves
2012-04-24 15:00           ` [committed]: " Yao Qi
2012-04-12  5:16 ` Doug Evans [this message]
2012-04-12  5:33   ` Yao Qi
2012-04-12 19:40     ` Doug Evans
2012-04-12 20:22       ` Tom Tromey

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='CADPb22TUoy36W5JoViOptaooWK=RnjL+u-9d4tDidSxg9iCOdg@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /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