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


> From: Nick Roberts <nickrob@snap.net.nz>
> Date: Fri, 15 Feb 2008 17:01:00 +1300
> Cc: Vladimir Prus <ghost@cs.msu.su>, gdb-patches@sourceware.org
> 
> *** breakpoint.c	15 Feb 2008 16:52:37 +1300	1.302
> --- breakpoint.c	15 Feb 2008 16:55:43 +1300	
> *************** print_one_breakpoint_location (struct br
> *** 3426,3448 ****
>     /* 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);
> !       /* 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)" : "");
> !       if (!pending)
> ! 	ui_out_spaces (uiout, 3);
> !     }
>   
>     
>     /* 5 and 6 */
> --- 3426,3436 ----
>     /* 4 */
>     annotate_field (3);
>     if (part_of_multiple)
> !     ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
>     else
> !       ui_out_field_fmt (uiout, "enabled", "%c", 
> !  			bpenables[(int) b->enable_state]);
> !   ui_out_spaces (uiout, 2);
>   
>     
>     /* 5 and 6 */
> *************** print_one_breakpoint_location (struct br
> *** 3553,3562 ****
>   	if (addressprint)
>   	  {
>   	    annotate_field (4);
> ! 	    if (b->loc == NULL)
> ! 	      ui_out_field_string (uiout, "addr", "<PENDING>");
> ! 	    else if (header_of_multiple)
>   	      ui_out_field_string (uiout, "addr", "<MULTIPLE>");
>   	    else
>   	      ui_out_field_core_addr (uiout, "addr", loc->address);
>   	  }
> --- 3541,3550 ----
>   	if (addressprint)
>   	  {
>   	    annotate_field (4);
> ! 	    if (header_of_multiple)
>   	      ui_out_field_string (uiout, "addr", "<MULTIPLE>");
> + 	    if (b->loc == NULL || loc->shlib_disabled)
> + 	      ui_out_field_string (uiout, "addr", "<PENDING>");
>   	    else
>   	      ui_out_field_core_addr (uiout, "addr", loc->address);
>   	  }
> *************** breakpoint_1 (int bnum, int allflag)
> *** 3781,3787 ****
>     ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");		/* 3 */
>     if (nr_printable_breakpoints > 0)
>       annotate_field (3);
> !   ui_out_table_header (uiout, 4, ui_left, "enabled", "Enb");	/* 4 */
>     if (addressprint)
>   	{
>   	  if (nr_printable_breakpoints > 0)
> --- 3769,3775 ----
>     ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");		/* 3 */
>     if (nr_printable_breakpoints > 0)
>       annotate_field (3);
> !   ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb");	/* 4 */
>     if (addressprint)
>   	{
>   	  if (nr_printable_breakpoints > 0)

This will require a suitable change to the manual, right?


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