Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Yao Qi <yao@codesourcery.com>
Subject: Re: [patch 4/8] Download tracepoint locations and track its status
Date: Thu, 10 Nov 2011 15:51:00 -0000	[thread overview]
Message-ID: <201111101551.20428.pedro@codesourcery.com> (raw)
In-Reply-To: <4EB9F7BF.7000005@codesourcery.com>

On Tuesday 08 November 2011 06:30:17, Yao Qi wrote:

> @@ -10660,6 +10713,8 @@ update_global_location_list (int should_insert)
>           || (gdbarch_has_global_breakpoints (target_gdbarch))))
>      insert_breakpoint_locations ();
>  
> +  download_tracepoint_locations ();

Should be guarded by `should_insert'.

> -      /* Skip LOCP entries which will definitely never be needed.
> +      /* skip LOCP entries which will definitely never be needed.

Drop this spurious change please.

> @@ -10491,7 +10539,9 @@ update_global_location_list (int should_insert)
>                              if it should be inserted in case it will be
>                              unduplicated.  */
>                           if (loc2 != old_loc
> -                             && unduplicated_should_be_inserted (loc2))
> +                             && unduplicated_should_be_inserted (loc2)
> +                             && (is_tracepoint (old_loc->owner)
> +                                 == is_tracepoint (loc2->owner)))

What if both are tracepoints, but of different kind?  I think this
might be better handled within breakpoint_locations_match (called just above).


>    /* Nonzero if this is not the first breakpoint in the list
> -     for the given address.  */
> +     for the given address.  In current implementation, location
> +     of tracepoint never be duplicated with other locations of
> +     tracepoints and other kinds of breakpoints, because two locations
> +     at the same address may have different actions, so both of
> +     these locations should be downloaded. 

and so that "tfind N" always works.

Please drop the "In current implementation" bit, and the "it is
possible" comment.

> +  /* Locations of tracepoints never be duplicated.  */

A verb is missing.  "can never be", perhaps?

> +  if (is_tracepoint (left->owner))
> +    gdb_assert (left->duplicate == 0);

`duplicate' is a boolean.  Make that `gdb_assert (!left->duplicate)'.

> +  if (is_tracepoint (right->owner))
> +    gdb_assert (right->duplicate == 0);

> +         gdb_assert (loc->inserted == 0);

Boolean ==> `gdb_assert (!loc->inserted)'

-- 
Pedro Alves


  reply	other threads:[~2011-11-10 15:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08  6:00 [patch 0/8] Download tracepoint locations when tracing is running Yao Qi
2011-11-08  6:08 ` [patch 1/8] Download tracepoint on location level Yao Qi
2011-11-09  3:34   ` Yao Qi
2011-11-10 14:54     ` Pedro Alves
2011-11-08  6:12 ` [patch 2/8] New remote feature InstallInTrace Yao Qi
2011-11-10 15:03   ` Pedro Alves
2011-11-08  6:21 ` [patch 3/8] New target hook `to_can_download_tracepoint_loc' Yao Qi
2011-11-10 15:11   ` Pedro Alves
2011-11-08  6:30 ` [patch 4/8] Download tracepoint locations and track its status Yao Qi
2011-11-09  3:47   ` Yao Qi
2011-11-10 15:51     ` Pedro Alves [this message]
2011-11-12  2:11       ` Yao Qi
2011-11-14 12:24         ` Pedro Alves
2011-11-08  6:33 ` [patch 5/8] refactor gdbserver on installing fast tracepoint Yao Qi
2011-11-10 15:57   ` Pedro Alves
2011-11-08  6:40 ` [patch 6/8] gdbserver - Install tracepoint when tracing is running Yao Qi
2011-11-08  8:20   ` Eli Zaretskii
2011-11-08  8:41     ` Yao Qi
2011-11-08 11:38       ` Eli Zaretskii
2011-11-10 16:53   ` Pedro Alves
2011-11-12  2:40     ` Yao Qi
2011-11-14 12:32       ` Pedro Alves
2011-11-08  6:43 ` [patch 7/8] Documentation changes Yao Qi
2011-11-08  8:37   ` Eli Zaretskii
2011-11-10 17:02   ` Pedro Alves
2011-11-12  3:09     ` Yao Qi
2011-11-08  6:56 ` [patch 8/8] Test cases Yao Qi
2011-11-10 17:16   ` Pedro Alves
2011-11-10 18:28   ` Pedro Alves
2011-11-12  3:35     ` Yao Qi
2011-11-14 13:00       ` Pedro Alves

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=201111101551.20428.pedro@codesourcery.com \
    --to=pedro@codesourcery.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