This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH: gdb/mi + doco] -var-update


 > It's okay with me, but I hope we won't forget the doco changes to go
 > with these.


I've changed the English slightly from last time, and because
"-var-list-children" and "-var-update" have the same optional argument, I only
describe it explictly once.  "-stack-list-locals" is slightly different
because print-values is not optional and "--print-simple-values" prints the
type also.

I've also corrected a spelling and made a couple of changes to the
GDB/MI command description format to reflect reality.

Nick


2005-07-05  Nick Roberts  <nickrob@snap.net.nz>

	* gdb.texinfo (GDB/MI Variable Objects): Describe print-values
	option for -var-list-children and -var-update.
	(GDB/MI Stack Manipulation): Simplify description of
	print-values option for -stack-list-locals.
	(GDB/MI Command Description Format): Clarify.
	(Mode Options): Spelling of superseded.


Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.272
diff -u -p -r1.272 gdb.texinfo
--- gdb.texinfo	2 Jul 2005 15:39:47 -0000	1.272
+++ gdb.texinfo	4 Jul 2005 20:59:48 -0000
@@ -1075,7 +1075,7 @@ normal, level 1 is for use when @value{G
 @sc{gnu} Emacs, level 3 is the maximum annotation suitable for programs
 that control @value{GDBN}, and level 2 has been deprecated.
 
-The annotation mechanism has largely been superseeded by @sc{gdb/mi}
+The annotation mechanism has largely been superseded by @sc{gdb/mi}
 (@pxref{GDB/MI}).
 
 @item --args
@@ -17094,19 +17094,14 @@ For each command in the block, the follo
  -command @var{args}@dots{}
 @end smallexample
 
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} CLI command.
-
 @subsubheading Result
 
-@subsubheading Out-of-band
+@subsubheading @value{GDBN} Command
 
-@subsubheading Notes
+The corresponding @value{GDBN} CLI command(s), if any.
 
 @subsubheading Example
 
-
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Breakpoint Table Commands
 @section @sc{gdb/mi} Breakpoint table commands
@@ -19491,15 +19486,15 @@ Show a single frame:
  -stack-list-locals @var{print-values}
 @end smallexample
 
-Display the local variable names for the current frame.  With an
-argument of 0 or @code{--no-values}, prints only the names of the variables.
-With argument of 1 or @code{--all-values}, prints also their values.  With
-argument of 2 or @code{--simple-values}, prints the name, type and value for
-simple data types and the name and type for arrays, structures and
-unions.  In this last case, the idea is that the user can see the
-value of simple data types immediately and he can create variable
-objects for other data types if he wishes to explore their values in
-more detail.
+Display the local variable names for the current frame.  A value for
+@var{print-values} of 0 or @code{--no-values}, prints only the names
+of the variables; a value of 1 or @code{--all-values}, prints also
+their values; and a value of 2 or @code{--simple-values}, prints the
+name, type and value for simple data types and the name and type for
+arrays, structures and unions.  In this last case, the idea is that
+the user can see the value of simple data types immediately and he can
+create variable objects for other data types if he wishes to explore
+their values in more detail.
 
 @subsubheading @value{GDBN} Command
 
@@ -20464,11 +20459,13 @@ Returns the number of children of a vari
  -var-list-children [@var{print-values}] @var{name}
 @end smallexample
 
-Returns a list of the children of the specified variable object.  With
-just the variable object name as an argument or with an optional
-preceding argument of 0 or @code{--no-values}, prints only the names of the
-variables.  With an optional preceding argument of 1 or @code{--all-values},
-also prints their values.
+Returns a list of the children of the specified variable object.  A
+single argument or an optional value for @var{print-values} of 0 or
+@code{--no-values}, prints only the names of the variables; a value
+for @var{print-values} of 1 or @code{--all-values}, also prints their
+values; and a value of 2 or @code{--simple-values} prints the name and
+value for simple data types and just the name for arrays, structures
+and unions.
 
 @subsubheading Example
 
@@ -20590,13 +20587,27 @@ subsequent @code{-var-update} list.
 @subsubheading Synopsis
 
 @smallexample
- -var-update @{@var{name} | "*"@}
+ -var-update [@var{print-values}] @{@var{name} | "*"@}
 @end smallexample
 
 Update the value of the variable object @var{name} by evaluating its
 expression after fetching all the new values from memory or registers.
-A @samp{*} causes all existing variable objects to be updated.
+A @samp{*} causes all existing variable objects to be updated.  
+The option @var{print-values} determines whether names and values, or
+just names are printed in the manner described for @code{-var-list-children}.
+
+@subsubheading Example
 
+@smallexample
+(@value{GDBP})
+-var-assign var1 3
+^done,value="3"
+(@value{GDBP})
+-var-update --all-values var1
+^done,changelist=[@{name="var1",value="3",in_scope="true",
+type_changed="false"@}]
+(@value{GDBP})
+@end smallexample
 
 @node Annotations
 @chapter @value{GDBN} Annotations


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]