[PATCH 1/6] Add a field 'installed' for each location of tracepoint.

Yao Qi
2012-12-04T04:45:22Z

Hi, this patch adds a field 'installed' indicating whether a
location of tracepoint is installed on target. In CLI, the output of
'info tracepoint' will be like this,

info trace
Num Type Disp Enb Address What^M
2 tracepoint keep y 0x080485b1 in main at gdb.trace/change-loc.c:29
installed y
4 tracepoint keep y <MULTIPLE>
collect $eip
4.1 y 0x0804859c in func4 at gdb.trace/change-loc.h:35
installed y
4.2 y 0xb7ffc480 in func4 at gdb.trace/change-loc.h:35
installed y

Of course, the breakpoint related MI notifications are changed as
well.

gdb:

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

* breakpoint.c (print_one_breakpoint_location): Add field
'installed' for each location of a tracepoint.
---
gdb/breakpoint.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 53944a6..40d2edd 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6123,6 +6123,17 @@ print_one_breakpoint_location (struct breakpoint *b,
ui_out_field_int (uiout, "pass", t->pass_count);
ui_out_text (uiout, " \n");
}
+
+ if (!header_of_multiple)
+ {
+ annotate_field (11);
+ ui_out_text (uiout, "\tinstalled ");
+ /* LOC is NULL means the tracepoint is still pending, set
+ field 'installed' 'n'. */
+ ui_out_field_string (uiout, "installed",
+ loc ? (loc->inserted ? "y" : "n") : "n");
+ ui_out_text (uiout, " \n");
+ }
}

if (ui_out_is_mi_like_p (uiout) && !part_of_multiple)
--
1.7.7.6