/* Flag indicating extra verbosity for xgdb. */
extern int xgdb_verbose;
+
+static void
+breakpoints_changed ()
+{
+ if (annotation_level > 1)
+ {
+ target_terminal_ours ();
+ printf_unfiltered ("\n\032\032breakpoints-invalid\n");
+ }
+}
\f
/* *PP is a string denoting a breakpoint. Get the number of the breakpoint.
Advance *PP after the string and any trailing whitespace.
l = read_command_lines ();
free_command_lines (&b->commands);
b->commands = l;
+ breakpoints_changed ();
return;
}
error ("No breakpoint number %d.", bnum);
continue;
if (!found_a_breakpoint++)
- printf_filtered ("Num Type Disp Enb %sWhat\n",
- addressprint ? "Address " : "");
-
- printf_filtered ("%-3d %-14s %-4s %-3c ",
- b->number,
- bptypes[(int)b->type],
- bpdisps[(int)b->disposition],
- bpenables[(int)b->enable]);
+ {
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoints-headers\n");
+
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 0\n");
+ printf_filtered ("Num ");
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 1\n");
+ printf_filtered ("Type ");
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 2\n");
+ printf_filtered ("Disp ");
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 3\n");
+ printf_filtered ("Enb ");
+ if (addressprint)
+ {
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 4\n");
+ printf_filtered ("Address ");
+ }
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 5\n");
+ printf_filtered ("What\n");
+
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoints-table\n");
+ }
+
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032record\n\n\032\032field 0\n");
+ printf_filtered ("%-3d ", b->number);
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 1\n");
+ printf_filtered ("%-14s ", bptypes[(int)b->type]);
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 2\n");
+ printf_filtered ("%-4s ", bpdisps[(int)b->disposition]);
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 3\n");
+ printf_filtered ("%-3c ", bpenables[(int)b->enable]);
+
strcpy (wrap_indent, " ");
if (addressprint)
strcat (wrap_indent, " ");
{
case bp_watchpoint:
case bp_hardware_watchpoint:
+ /* Field 4, the address, is omitted (which makes the columns
+ not line up too nicely with the headers, but the effect
+ is relatively readable). */
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 5\n");
print_expression (b->exp, gdb_stdout);
break;
case bp_watchpoint_scope:
case bp_call_dummy:
if (addressprint)
- printf_filtered ("%s ", local_hex_string_custom ((unsigned long) b->address, "08l"));
+ {
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 4\n");
+ /* FIXME-32x64: need a print_address_numeric with
+ field width */
+ printf_filtered
+ ("%s ",
+ local_hex_string_custom
+ ((unsigned long) b->address, "08l"));
+ }
+
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 5\n");
last_addr = b->address;
if (b->source_file)
if (b->frame)
{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 6\n");
+
printf_filtered ("\tstop only in stack frame at ");
print_address_numeric (b->frame, gdb_stdout);
printf_filtered ("\n");
}
+
if (b->cond)
{
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 7\n");
+
printf_filtered ("\tstop only if ");
print_expression (b->cond, gdb_stdout);
printf_filtered ("\n");
}
+
if (b->ignore_count)
- printf_filtered ("\tignore next %d hits\n", b->ignore_count);
+ {
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 8\n");
+
+ printf_filtered ("\tignore next %d hits\n", b->ignore_count);
+ }
+
if ((l = b->commands))
- while (l)
- {
- fputs_filtered ("\t", gdb_stdout);
- fputs_filtered (l->line, gdb_stdout);
- fputs_filtered ("\n", gdb_stdout);
- l = l->next;
- }
+ {
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032field 9\n");
+
+ while (l)
+ {
+ fputs_filtered ("\t", gdb_stdout);
+ fputs_filtered (l->line, gdb_stdout);
+ fputs_filtered ("\n", gdb_stdout);
+ l = l->next;
+ }
+ }
}
if (!found_a_breakpoint)
that a comparison of an unsigned with -1 is always false. */
if (last_addr != (CORE_ADDR)-1)
set_next_address (last_addr);
+
+ if (annotation_level > 1)
+ printf_filtered ("\n\032\032breakpoints-table-end\n");
}
/* ARGSUSED */
}
check_duplicates (sal.pc);
+ breakpoints_changed ();
return b;
}
b->watchpoint_frame = FRAME_FP (frame);
}
else
- b->watchpoint_frame = NULL;
+ b->watchpoint_frame = (CORE_ADDR)0;
if (can_use_hardware_watchpoint (b))
b->type = bp_hardware_watchpoint;
if (!(v->lval == lval_memory)
|| v->lval == not_lval
|| (v->lval != not_lval
- && v->modifiable == false))
+ && v->modifiable == 0))
return 0;
else
if (v->lval == lval_memory)
if (found->next) from_tty = 1; /* Always report if deleted more than one */
if (from_tty) printf_unfiltered ("Deleted breakpoint%s ", found->next ? "s" : "");
+ breakpoints_changed ();
while (found)
{
if (from_tty) printf_unfiltered ("%d ", found->number);
if (bpt->source_file != NULL)
free (bpt->source_file);
- if (xgdb_verbose && bpt->type == bp_breakpoint)
- {
- target_terminal_ours_for_output ();
- printf_unfiltered ("breakpoint #%d deleted\n", bpt->number);
- }
+ breakpoints_changed ();
/* Be sure no bpstat's are pointing at it after it's been freed. */
/* FIXME, how can we find all bpstat's?
check_duplicates (b->address);
mention (b);
+
+ /* Might be better to do this just once per breakpoint_re_set,
+ rather than once for every breakpoint. */
+ breakpoints_changed ();
}
b->enable = save_enable; /* Restore it, this worked. */
}
else
printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
count, bptnum);
+ breakpoints_changed ();
return;
}
longest_to_int (value_as_long (parse_and_eval (p))),
from_tty);
printf_filtered ("\n");
+ breakpoints_changed ();
}
\f
/* Call FUNCTION on each of the breakpoints
bpt->enable = enabled;
- if (xgdb_verbose && bpt->type == bp_breakpoint)
- printf_unfiltered ("breakpoint #%d enabled\n", bpt->number);
+ breakpoints_changed ();
check_duplicates (bpt->address);
if (bpt->type == bp_watchpoint || bpt->type == bp_hardware_watchpoint)
bpt->enable = disabled;
- if (xgdb_verbose && bpt->type == bp_breakpoint)
- printf_filtered ("breakpoint #%d disabled\n", bpt->number);
+ breakpoints_changed ();
check_duplicates (bpt->address);
}
bpt->disposition = disable;
check_duplicates (bpt->address);
+ breakpoints_changed ();
}
/* ARGSUSED */
bpt->disposition = delete;
check_duplicates (bpt->address);
+ breakpoints_changed ();
}
/* ARGSUSED */