This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [8/9] multiple locations
> As I say in another email, I might be able to implement using <PENDING>
> as address in all cases.
I don't pretend to understand the code but the patch below seems to work
for me (probably not all cases).
> But generally, trying to keeping CLI back compatible have to stop
> at some time -- if we keep this "don't break CLI clients even if
> CLI clients were deprecated from some time" attitude, it will result
> in new features being available via MI only.
Focussing on the issue at hand, we're just talking about making a minor
adjustment to the format of "info breakpoints", for the case of pending
breakpoints, to avoid breaking existing frontend(s). AFAIK no-one is talking
about making this or anything else a MI only feature.
--
Nick http://www.inet.net.nz/~nickrob
2007-11-14 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.~1.278.~ 2007-11-09 17:16:10.000000000 +1300
--- breakpoint.c 2007-11-14 19:52:35.000000000 +1300
*************** print_one_breakpoint_location (struct br
*** 3555,3564 ****
/* 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);
--- 3555,3561 ----
/* 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
*** 3566,3576 ****
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);
}
--- 3563,3570 ----
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
*** 3704,3710 ****
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>");
--- 3698,3704 ----
if (addressprint)
{
annotate_field (4);
! 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>");