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] Fix dprintf work not right if it is pending


On 04/05/2013 09:06 AM, Pedro Alves wrote:
Thanks for the help Keith.  Much appreciated.

I'm not exactly sure I would call this "helping." I think I created more work than I actually saved. My apologies for that. That certainly wasn't my intent.

I think we want this:

static void
dprintf_re_set (struct breakpoint *b)
{
   breakpoint_re_set_default (b);

   /* This breakpoint could have been pending, and be resolved now, and
      if so, we should now have the extra string.  If we don't, the
      dprintf was malformed when created, but we couldn't tell because
      we can't extract the extra string until the location is
      resolved.  */
   if (b->loc != NULL && b->extra_string == NULL)
     error (_("Format string required"));

   if (b->extra_string != NULL)
     update_dprintf_command_list (b);
}

Yeah, that's good. Me likey. That was more like what I have in my sandbox.

You mean, only update the command list if there isn't one before
(because the breakpoint was pending before) ?

Yeah, I did mean that. Thank you to both you and Hui for clarifying why this is necessary.

Thank you for your review of my review, too!

Keith


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