Re: [PATCH] traceframe_changed observer and MI notification

Yao Qi
2012-09-18T08:48:39Z

On 09/18/2012 04:01 PM, Eli Zaretskii wrote:
> Then that line should be deleted.
>

OK.

>>> > >Also, I don't understand the significance of the reference to
>>> > >'tfind'. Why is it important to mention that?
>>> > >
>> >
>> >because users use command 'tfind' to examine a certain traceframe, and
>> >the changes of traceframe trigger this MI notification, so I mention
>> >'tfind' here.
> The text you wrote can be interpreted as if using 'tfind' was the only
> way to change the trace frame. If that's not true, 'tfind' it should
> be mentioned in parentheses, something like
>
> (e.g., by using the @code{tfind} command)

How about the new one?

--
Yao

gdb/doc:

* observer.texi (GDB Observers): New observer 'traceframe_changed'.
* gdb.texinfo (GDB/MI Async Records): Mention new MI notification
'=traceframe-changed'.
gdb:

* NEWS: Mention the new MI notification.
---
diff --git a/gdb/NEWS b/gdb/NEWS
index dba6937..126c2af 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -43,6 +43,8 @@ py [command]

** Command parameter changes are now notified using new async record
"=cmd-param-changed".
+ ** Trace frame changes caused by command "tfind" are now notified using
+ new async record "=traceframe-changed".

*** Changes in GDB 7.5

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index dc8860a..ee03521 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -27633,6 +27633,12 @@ thread group in whose context the library was unloaded. If the field is
absent, it means the library was unloaded in the context of all present
thread groups.

+@item =traceframe-changed,num=@var{tfnum},tracepoint=@var{tpnum}
+@itemx =traceframe-changed,end
+Reports that the trace frame was changed and its new number is
+@var{tfnum}. The number of the tracepoint associated with this trace
+frame is @var{tpnum}.
+
@item =breakpoint-created,bkpt=@{...@}
@itemx =breakpoint-modified,bkpt=@{...@}
@itemx =breakpoint-deleted,id=@var{number}
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index c81e137..f682e9e 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -187,6 +187,13 @@ A tracepoint has been modified in some way. The argument @var{tpnum}
is the number of the modified tracepoint.
@end deftypefun

+@deftypefun void traceframe_changed (int @var{tfnum}, int @var{tpnum})
+The trace frame is changed to @var{tfnum} (e.g., by using the
+@code{tfind} command). The number of the tracepoint associated with
+this traceframe is @var{tpnum}. If @var{tfnum} is negative, it means
+@value{GDBN} resumes live debugging.
+@end deftypefun
+
@deftypefun void architecture_changed (struct gdbarch *@var{newarch})
The current architecture has changed. The argument @var{newarch} is
a pointer to the new architecture.
---