This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 3/5] Print a message on gdb disconnected.


On Tuesday 15 November 2011 07:46:52, Yao Qi wrote:
> +static void
> +process_tracepoint_on_disconnect (void)
> +{
> +  VEC(breakpoint_p) *tp_vec = NULL;
> +  int ix;
> +  struct breakpoint *b;
> +  int has_pending_p = 0;
> +
> +  /* Check whether we still have pending tracepoint.  If we have, warn the
> +     user that pending tracepoint will no longer work.  */
> +  tp_vec = all_tracepoints ();
> +  for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, b); ix++)
> +    {
> +      if (b->loc == NULL || b->loc->shlib_disabled)

It's not garanteed that the first location is the one that
is shlib_disabled.  If you want the warning for the shlib_disabled
cases, you'll need to iterate over the breakpoint's locations.

> +       {
> +         has_pending_p = 1;
> +         break;
> +       }
> +    }
> +  VEC_free (breakpoint_p, tp_vec);
> +
> +  if (has_pending_p)
> +    warning (_("Pending tracepoint will not be resolved while"
> +              " GBD is disconnected\n"));

Plural, "Pending tracepoints".

Otherwise okay.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]