diff options
author | Yao Qi <yao@codesourcery.com> | 2013-06-26 08:17:27 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-06-26 08:17:27 +0000 |
commit | dc673c81ae099d18e348ef2a7b93794cc9f8e33b (patch) | |
tree | 24e8dd7a0661b55651ced17b9254782f005ead77 /gdb/doc | |
parent | e335d9cbd89a0a80bd2b0cbdcf60061d3ec75902 (diff) | |
download | gdb-dc673c81ae099d18e348ef2a7b93794cc9f8e33b.zip gdb-dc673c81ae099d18e348ef2a7b93794cc9f8e33b.tar.gz gdb-dc673c81ae099d18e348ef2a7b93794cc9f8e33b.tar.bz2 |
gdb/
2013-06-26 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Tracepoint Commands): Document
-trace-frame-collected.
gdb:
2013-06-26 Pedro Alves <pedro@codesourcery.com>
Yao Qi <yao@codesourcery.com>
* mi/mi-cmds.c (mi_cmds): Register -trace-frame-collected.
* mi/mi-cmds.h (mi_cmd_trace_frame_collected): Declare.
* mi/mi-main.c (print_variable_or_computed): New function.
(mi_cmd_trace_frame_collected): New function.
* tracepoint.c (find_trace_state_variable_by_number): New.
(struct traceframe_info): Move to tracepoint.h
(struct collection_list): Likewise.
(do_collect_symbol): Include locals and arguments in the wholly
collected variables list.
(clear_collection_list): Clear wholly collected variables list
and computed variables list.
(append_exp): New function.
(encode_actions_1): Include variables in the wholly
collected variables list. Include memory ranges and
full-fledged expressions in the computed expressions list.
(encode_actions): Move some code to ...
Return the cleanup chain.
(encode_actions_rsp): ... here. New function.
(get_traceframe_location, get_traceframe_info): Remove static.
* tracepoint.h (struct memrange): Moved from tracepoint.c.
(struct collection_list): Moved from tracepoint.c. Add two
new fields 'wholly_collected' and 'computed'.
(find_trace_state_variable_by_number): Declare.
(encode_actions): Adjust declaration.
(encode_actions_rsp): Declare.
(get_traceframe_info, get_traceframe_location): Declare.
* NEWS: Mention new MI command -trace-frame-collected.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 117 |
2 files changed, 123 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 5090ae9..285bb96 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,4 +1,10 @@ 2013-06-26 Pedro Alves <pedro@codesourcery.com> + Yao Qi <yao@codesourcery.com> + + * gdb.texinfo (GDB/MI Tracepoint Commands): Document + -trace-frame-collected. + +2013-06-26 Pedro Alves <pedro@codesourcery.com> * gdb.texinfo (Traceframe Info Format): Document tvar element and its attributes. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 3992704..d75a3d1 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -33161,6 +33161,123 @@ with the @samp{$} character. The corresponding @value{GDBN} command is @samp{tvariable}. +@subheading The @code{-trace-frame-collected} Command +@findex -trace-frame-collected + +@subsubheading Synopsis + +@smallexample + -trace-frame-collected + [--var-print-values @var{var_pval}] + [--comp-print-values @var{comp_pval}] + [--registers-format @var{regformat}] + [--memory-contents] +@end smallexample + +This command returns the set of collected objects, register names, +trace state variable names, memory ranges and computed expressions +that have been collected at a particular trace frame. The optional +parameters to the command affect the output format in different ways. +See the output description table below for more details. + +The reported names can be used in the normal manner to create +varobjs and inspect the objects themselves. The items returned by +this command are categorized so that it is clear which is a variable, +which is a register, which is a trace state variable, which is a +memory range and which is a computed expression. + +For instance, if the actions were +@smallexample +collect myVar, myArray[myIndex], myObj.field, myPtr->field, myCount + 2 +collect *(int*)0xaf02bef0@@40 +@end smallexample + +@noindent +the object collected in its entirety would be @code{myVar}. The +object @code{myArray} would be partially collected, because only the +element at index @code{myIndex} would be collected. The remaining +objects would be computed expressions. + +An example output would be: + +@smallexample +(gdb) +-trace-frame-collected +^done, + explicit-variables=[@{name="myVar",value="1"@}], + computed-expressions=[@{name="myArray[myIndex]",value="0"@}, + @{name="myObj.field",value="0"@}, + @{name="myPtr->field",value="1"@}, + @{name="myCount + 2",value="3"@}, + @{name="$tvar1 + 1",value="43970027"@}], + registers=[@{number="0",value="0x7fe2c6e79ec8"@}, + @{number="1",value="0x0"@}, + @{number="2",value="0x4"@}, + ... + @{number="125",value="0x0"@}], + tvars=[@{name="$tvar1",current="43970026"@}], + memory=[@{address="0x0000000000602264",length="4"@}, + @{address="0x0000000000615bc0",length="4"@}] +(gdb) +@end smallexample + +Where: + +@table @code +@item explicit-variables +The set of objects that have been collected in their entirety (as +opposed to collecting just a few elements of an array or a few struct +members). For each object, its name and value are printed. +The @code{--var-print-values} option affects how or whether the value +field is output. If @var{var_pval} is 0, then print only the names; +if it is 1, print also their values; and if it is 2, print the name, +type and value for simple data types, and the name and type for +arrays, structures and unions. + +@item computed-expressions +The set of computed expressions that have been collected at the +current trace frame. The @code{--comp-print-values} option affects +this set like the @code{--var-print-values} option affects the +@code{explicit-variables} set. See above. + +@item registers +The registers that have been collected at the current trace frame. +For each register collected, the name and current value are returned. +The value is formatted according to the @code{--registers-format} +option. See the @command{-data-list-register-values} command for a +list of the allowed formats. The default is @samp{x}. + +@item tvars +The trace state variables that have been collected at the current +trace frame. For each trace state variable collected, the name and +current value are returned. + +@item memory +The set of memory ranges that have been collected at the current trace +frame. Its content is a list of tuples. Each tuple represents a +collected memory range and has the following fields: + +@table @code +@item address +The start address of the memory range, as hexadecimal literal. + +@item length +The length of the memory range, as decimal literal. + +@item contents +The contents of the memory block, in hex. This field is only present +if the @code{--memory-contents} option is specified. + +@end table + +@end table + +@subsubheading @value{GDBN} Command + +There is no corresponding @value{GDBN} command. + +@subsubheading Example + @subheading -trace-list-variables @findex -trace-list-variables |