This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA]: Fix for pending breakpoints in manually loaded/unloaded shlibs


On Wed, Aug 18, 2004 at 03:22:22PM -0400, Jeff Johnston wrote:
> Daniel Jacobowitz wrote:
> >On Wed, Aug 11, 2004 at 04:12:07PM -0400, Jeff Johnston wrote:
> >>+	if (so_name 
> >>+	    && !strcmp (so_name, solib->so_name))
> >>+          {
> >>+	    b->enable_state = bp_shlib_disabled;
> >>+	    /* At this point, we cannot rely on remove_breakpoint
> >>+	       succeeding so we must mark the breakpoint as not inserted
> >>+	       to prevent future errors occurring in remove_breakpoints.  */
> >>+	    b->loc->inserted = 0;
> >>+	    if (!disabled_shlib_breaks)
> >>+	      {
> >>+		target_terminal_ours_for_output ();
> >>+		warning ("Temporarily disabling unloaded shared library 
> >>breakpoints:");
> >>+	      }
> >>+	    disabled_shlib_breaks = 1;
> >>+	    warning ("breakpoint #%d ", b->number);
> >
> >
> >I think you're missing a space after the colon, in the first warning.
> >Also, this use of multiple warning() statements is neither i18n
> >friendly nor MI/GUI friendly - you may get a separate dialog box for
> >each.  I believe other places do this with sprintf; still not 100% i18n
> >friendly, but avoids the MI/GUI problems.  I can't find an example
> >offhand.
> >
> 
> What you do want to see so I don't waste my time on this.  As you already 
> know, this routine was copied from the routine which disables shared 
> library breakpoints in breakpoint.c.  Is it sufficient to just issue the 
> warning that I am temporarily disabling unloaded shared library breakpoints 
> and not spell out each breakpoint in turn?  I can see this as really 
> annoying and pointless to an end-user if there are hundreds or thousands of 
> breakpoints.

That's a good idea.  How about this?

    target_terminal_ours_for_output ();
    warning ("Temporarily disabling breakpoints for unloaded shared library \"%s\",
	     so_name);

-- 
Daniel Jacobowitz


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