[PATCH 1/6] Add a field 'installed' for each location of tracepoint.

Pedro Alves palves@redhat.com
Tue Dec 11 17:26:00 GMT 2012


On 12/09/2012 12:49 PM, Yao Qi wrote:
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 94874ec..5d5033f 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -6123,6 +6123,25 @@ print_one_breakpoint_location (struct breakpoint *b,
>  	  ui_out_field_int (uiout, "pass", t->pass_count);
>  	  ui_out_text (uiout, " \n");
>  	}
> +
> +      /* Don't display it when tracepoint or tracepoint location is
> +	 pending.   */

I'm not a native speaker, but using a pronoun ("it") as a forward reference
to refer to something that only appears afterwards parses awkwardly to me.
I suggest:

      /* For tracepoints, display the installed state, but not if the tracepoint
         or tracepoint location is pending.   */

> +      if (!header_of_multiple && loc != NULL && !loc->shlib_disabled)
> +	{
> +	  annotate_field (11);
> +
> +	  if (ui_out_is_mi_like_p (uiout))
> +	    ui_out_field_string (uiout, "installed",
> +				 loc->inserted ? "y" : "n");
> +	  else
> +	    {
> +	      if (loc->inserted)
> +		ui_out_text (uiout, "\t");
> +	      else
> +		ui_out_text (uiout, "\tnot ");
> +	      ui_out_text (uiout, "installed on target\n");
> +	    }
> +	}
>      }

Wait, what is making sure this is only printed for tracepoints?

-- 
Pedro Alves



More information about the Gdb-patches mailing list