Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/6] Add a field 'installed' for each location of tracepoint.
Date: Thu, 06 Dec 2012 20:56:00 -0000	[thread overview]
Message-ID: <50C10675.3000405@redhat.com> (raw)
In-Reply-To: <1354596282-32526-2-git-send-email-yao@codesourcery.com>

On 12/04/2012 04:44 AM, Yao Qi wrote:
> Hi, this patch adds a field 'installed' indicating whether a
> location of tracepoint is installed on target.  In CLI, the output of
> 'info tracepoint' will be like this,
> 
> info trace
> Num     Type           Disp Enb Address    What^M
> 2       tracepoint     keep y   0x080485b1 in main at gdb.trace/change-loc.c:29
>         installed y

I'd prefer:

2       tracepoint     keep y   0x080485b1 in main at gdb.trace/change-loc.c:29
        installed on target
3       tracepoint     keep y   0x080485b1 in main at gdb.trace/change-loc.c:29
        not installed on target

As the other similar cases of more breakpoint info more textual as well:

4       breakpoint     keep y   0x0804c8a5 in main at ../../src/gdb/gdb.c:29
        breakpoint already hit 1 time

This should be documented in the manual and NEWS, both the CLI changes, and
the MI change (this patch adds the "installed" field to various MI things).

> Of course, the breakpoint related MI notifications are changed as
> well.
> 
> gdb:
> 
> 2012-12-03  Yao Qi  <yao@codesourcery.com>
> 
> 	* breakpoint.c (print_one_breakpoint_location): Add field
> 	'installed' for each location of a tracepoint.
> ---
>  gdb/breakpoint.c |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 53944a6..40d2edd 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -6123,6 +6123,17 @@ print_one_breakpoint_location (struct breakpoint *b,
>  	  ui_out_field_int (uiout, "pass", t->pass_count);
>  	  ui_out_text (uiout, " \n");
>  	}
> +
> +      if (!header_of_multiple)
> +	{
> +	  annotate_field (11);
> +	  ui_out_text (uiout, "\tinstalled ");
> +	  /* LOC is NULL means the tracepoint is still pending, set
> +	     field 'installed' 'n'.  */
> +	  ui_out_field_string (uiout, "installed",
> +			       loc ? (loc->inserted ? "y" : "n") : "n");
> +	  ui_out_text (uiout, " \n");

Not sure about the pending case.  Can you show how does that look like?
Why not just display nothing in that case?  How does the MI output look
like in the pending case?

> +	}
>      }
>  
>    if (ui_out_is_mi_like_p (uiout) && !part_of_multiple)
> 


-- 
Pedro Alves


  reply	other threads:[~2012-12-06 20:56 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04  4:45 [PATCH 0/6] Add a new field 'installed' when reporting tracepoint Yao Qi
2012-12-04  4:45 ` [PATCH 1/6] Add a field 'installed' for each location of tracepoint Yao Qi
2012-12-06 20:56   ` Pedro Alves [this message]
2012-12-07 13:49     ` Yao Qi
2012-12-09 12:49     ` Yao Qi
2012-12-09 16:57       ` Eli Zaretskii
2012-12-11 17:26       ` Pedro Alves
2012-12-12  1:54         ` Yao Qi
2012-12-12 12:03           ` Pedro Alves
2012-12-04  4:45 ` [PATCH 4/6] Notify breakpoint-modified when uploaded tracepoints are merged Yao Qi
2012-12-06 20:57   ` Pedro Alves
2012-12-04  4:45 ` [PATCH 5/6] Test tracepoints are installed or not Yao Qi
2012-12-07 12:39   ` Pedro Alves
2012-12-07 13:55     ` Yao Qi
2012-12-07 14:20       ` Pedro Alves
2012-12-09 12:53         ` Yao Qi
2012-12-11 17:53           ` Pedro Alves
2012-12-12  2:59             ` Yao Qi
2012-12-12 12:24               ` Pedro Alves
2012-12-12 15:00                 ` Yao Qi
2012-12-04  4:45 ` [PATCH 6/6] Update test cases for 'installed' field Yao Qi
2012-12-07 12:42   ` Pedro Alves
2012-12-13 12:07     ` Yao Qi
2012-12-13 17:13       ` Pedro Alves
2012-12-04  4:45 ` [PATCH 2/6] Iterate over ALL_TRACEPOINTS first Yao Qi
2012-12-06 20:56   ` Pedro Alves
2012-12-04  4:45 ` [PATCH 3/6] Notify breakpoint-modified when tracepoints are downloaded Yao Qi
2012-12-06 20:56   ` Pedro Alves
2012-12-06 20:55 ` [PATCH 0/6] Add a new field 'installed' when reporting tracepoint 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=50C10675.3000405@redhat.com \
    --to=palves@redhat.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