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


> I think the patch below, based on my initial patch and Vladimir's subsequent
> comment, will fix it.  No regressions.

This looks fine. But I'd like to hear at least from Vladimir.

I have a question: Isn't this part going to break your parser as well?


      int pending = (b->loc == NULL || b->loc->shlib_disabled);
      /* For header of multiple, there's no point showing pending
         state -- it will be apparent from the locations.  */
      if (header_of_multiple)
        pending = 0;
      ui_out_field_fmt (uiout, "enabled", "%c%s",
                        bpenables[(int) b->enable_state],
                        pending ? "(p)" : "");

This is the counterpart of the branch you modified. As you can see,
it can print the dreaded "(p)" in addition to the y/n enabled state.

> -- 
> Nick                                           http://www.inet.net.nz/~nickrob
> 
> 
> *** breakpoint.c	04 Feb 2008 09:10:59 +1300	1.301
> --- breakpoint.c	04 Feb 2008 09:11:02 +1300	
> *************** print_one_breakpoint_location (struct br
> *** 3425,3434 ****
>     /* 4 */
>     annotate_field (3);
>     if (part_of_multiple)
> !     ui_out_field_string (uiout, "enabled", 
> ! 			 loc->shlib_disabled 
> ! 			 ? (loc->enabled ? "y(p)" : "n(p)")
> ! 			 : (loc->enabled ? "y" : "n"));
>     else
>       {
>         int pending = (b->loc == NULL || b->loc->shlib_disabled);
> --- 3425,3431 ----
>     /* 4 */
>     annotate_field (3);
>     if (part_of_multiple)
> !     ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
>     else
>       {
>         int pending = (b->loc == NULL || b->loc->shlib_disabled);
> *************** 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);
>   	  }

-- 
Joel


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