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: (gdb-6.8) Discard breakpoint address if shared library is unloaded


> > *************** print_one_breakpoint_location (struct br
> > *** 3556,3561 ****
> > --- 3553,3560 ----
> >   	      ui_out_field_string (uiout, "addr", "<PENDING>");
> >   	    else if (header_of_multiple)
> >   	      ui_out_field_string (uiout, "addr", "<MULTIPLE>");
> > + 	    else if (loc->shlib_disabled)
> > + 	      ui_out_field_string (uiout, "addr", "<PENDING>");
> >   	    else
> >   	      ui_out_field_core_addr (uiout, "addr", loc->address);

And I forgot. You can also avoid some code duplication by changing:

Index: breakpoint.c
===================================================================
--- breakpoint.c	(revision 146)
+++ breakpoint.c	(working copy)
@@ -3506,7 +3506,7 @@ print_one_breakpoint_location (struct br
 	if (addressprint)
 	  {
 	    annotate_field (4);
-	    if (b->loc == NULL)
+	    if (b->loc == NULL || loc->shlib_disabled)
 	      ui_out_field_string (uiout, "addr", "<PENDING>");
 	    else if (header_of_multiple)
 	      ui_out_field_string (uiout, "addr", "<MULTIPLE>");

-- 
Joel


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