2012-12-15 Yao Qi <yao@codesourcery.com>

* breakpoint.c (print_one_breakpoint_location): Display the
	state of 'installed' of each non-pending location of a tracepoint
	in both CLI and MI.
	(download_tracepoint_locations): Notify 'breakpoint-modified'
	observer if any tracepoint location is downloaded.
	* tracepoint.c (start_tracing): Likewise.
	(merge_uploaded_tracepoints): Record all modified
	tracepoints and notify 'breakpoint-modified' observer for them.

	* NEWS: Mention the change for CLI and MI.

gdb/doc:
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (Listing Tracepoints): New item and example about
	'installed on target' output.
	Add more in the example about 'installed on target'.
	(GDB/MI Breakpoint Commands): Doc about 'installed field.

gdb/testsuite:
2012-12-15  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/mi-tracepoint-changed.exp (test_pending_resolved): Check
	'installed' field in '=breakpoint-modified'.
	(test_reconnect): Check 'installed' field in
	'=breakpoint-modified' and '=breakpoint-created'.

	* gdb.trace/actions.exp: Update test for 'installed' field.
	* gdb.trace/change-loc.exp (tracepoint_change_loc_1):
	(tracepoint_change_loc_2): Likewise.
	Check 'info tracepoint' display nothing else.
	* gdb.trace/deltrace.exp: Likewise.
	* gdb.trace/infotrace.exp: Likewise.
	* gdb.trace/mi-traceframe-changed.exp (test_tfind_remote):
	Likewise.
	* gdb.trace/passcount.exp: Likewise.
	* gdb.trace/tracecmd.exp: Likewise.
	* gdb.trace/while-stepping.exp: Likewise.
This commit is contained in:
Yao Qi
2012-12-15 02:19:21 +00:00
parent 59965708ea
commit f2a8bc8a74
16 changed files with 221 additions and 44 deletions

View File

@ -6120,6 +6120,25 @@ print_one_breakpoint_location (struct breakpoint *b,
ui_out_field_int (uiout, "pass", t->pass_count);
ui_out_text (uiout, " \n");
}
/* Don't display it when tracepoint or tracepoint location is
pending. */
if (!header_of_multiple && loc != NULL && !loc->shlib_disabled)
{
annotate_field (11);
if (ui_out_is_mi_like_p (uiout))
ui_out_field_string (uiout, "installed",
loc->inserted ? "y" : "n");
else
{
if (loc->inserted)
ui_out_text (uiout, "\t");
else
ui_out_text (uiout, "\tnot ");
ui_out_text (uiout, "installed on target\n");
}
}
}
if (ui_out_is_mi_like_p (uiout) && !part_of_multiple)
@ -12093,6 +12112,7 @@ download_tracepoint_locations (void)
{
struct bp_location *bl;
struct tracepoint *t;
int bp_location_downloaded = 0;
if ((b->type == bp_fast_tracepoint
? !may_insert_fast_tracepoints
@ -12112,9 +12132,12 @@ download_tracepoint_locations (void)
target_download_tracepoint (bl);
bl->inserted = 1;
bp_location_downloaded = 1;
}
t = (struct tracepoint *) b;
t->number_on_target = b->number;
if (bp_location_downloaded)
observer_notify_breakpoint_modified (b);
}
do_cleanups (old_chain);