This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded
> I have a question: Isn't this part going to break your parser as well?
Yes. It was in my original patch but I seem to have lost it somehow in the
intervening period. I attach the updated patch.
Thanks.
> 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
2008-02-05 Nick Roberts <nickrob@snap.net.nz>
* breakpoint.c (print_one_breakpoint_location): Revert Enb field
to old format. Discard breakpoint address if shared library is
unloaded.
*** breakpoint.c 04 Feb 2008 09:10:59 +1300 1.301
--- breakpoint.c 05 Feb 2008 13:46:40 +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
*** 3436,3446 ****
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);
}
--- 3433,3440 ----
state -- it will be apparent from the locations. */
if (header_of_multiple)
pending = 0;
! ui_out_field_fmt (uiout, "enabled", "%c",
! bpenables[(int) b->enable_state]);
}
*************** print_one_breakpoint_location (struct br
*** 3556,3561 ****
--- 3550,3557 ----
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);
}