Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Denis PILAT <denis.pilat@st.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	drow@false.org, 	gdb-patches@sourceware.org
Subject: Re: [RFC] varobj deletion after the binary has changed
Date: Tue, 13 Feb 2007 00:11:00 -0000	[thread overview]
Message-ID: <17873.537.58649.22396@kahikatea.snap.net.nz> (raw)
In-Reply-To: <45D05B3B.5050408@st.com>

 > Thanks you for the documentation update.
 > Hereby is 2 patches I would like to commit, the C part and the new . exp 
 > file.
 > I change the .exp file with your comment, with a newer copyright notice, 
 > and with including value field in output of -var-create.
 > I also changed a comment plus typos in the C code.
 > 
 > Daniel already approved the sources, Eli is near to be fine with the doc.
 > Could have a look once more into the  following, at least for the 
 > ChangeLog entry ?
 > Then how could we synchronize our commit ?

I've committed my documentation with requested changes (see below).  All you
need to do is commit yours.

 > 2007-02-12  Denis Pilat  <denis.pilat@st.com>
 > 
 > 	* gdb.mi/mi-var-invalidate.exp: New files.

                                        New file.

 > 2007-02-12  Denis Pilat  <denis.pilat@st.com>
 > 
 > 	* varobj.c (struct varobj_root): Add is_valid member.
 > 	(varobj_get_type): Check for invalid varobj.
 > 	(varobj_get_attributes): Likewise.
 > 	(variable_editable):Likewise.
 > 	(varobj_update): Likewise plus use an enum for returned error values.
 > 	(new_root_variable): Set root varobj as valid by default.
 > 	(varobj_invalidate): New function.
 > 	* varobj.h (enum varobj_update_error): New enum.
 > 	(varobj_invalidate): New function.
duplicate entry

 > 	* symfile.c (clear_symtab_users): Use varobj_invalidate.
 > 	* mi/mi-cmd-var.c (varobj_update_one): Change returned type to void and
 > 	use of new enum varobj_update_error to deal with errors.

 	* varobj.h (enum varobj_update_error): New enum.
 	* varobj.c (struct varobj_root): Add is_valid member.
 	(varobj_get_type): Check for invalid varobj.
 	(varobj_get_attributes): Likewise.
 	(variable_editable):Likewise.
 	(varobj_update): Likewise.  Use varobj_update_error.
 	(new_root_variable): Set root varobj as valid by default.
 	(varobj_invalidate): New function.
 	* symfile.c (clear_symtab_users): Use varobj_invalidate.
 	* mi/mi-cmd-var.c (varobj_update_one): Change return type to void.
  	Use varobj_update_error.

(Suggestion)

-- 
Nick                                           http://www.inet.net.nz/~nickrob


2007-02-13  Nick Roberts  <nickrob@snap.net.nz>

	* gdb.texinfo (GDB/MI Variable Objects): Describe meanings of
	values for in_scope.  Mention that only root variables can be
	updated.
	(GDB/MI Development and Front Ends): Explain new values may be
	added to existing fields.


*** gdb.texinfo	13 Feb 2007 12:48:47 +1300	1.385
--- gdb.texinfo	10 Feb 2007 10:15:05 +1300	
*************** New MI commands may be added.
*** 17732,17737 ****
--- 17732,17741 ----
  @item
  New fields may be added to the output of any MI command.
  
+ @item
+ The range of values for fields with specified values, e.g.,
+ @code{in_scope} (@pxref{-var-update}) may be extended.
+ 
  @c The format of field's content e.g type prefix, may change so parse it
  @c   at your own risk.  Yes, in general?
  
*************** subsequent @code{-var-update} list.
*** 19972,19987 ****
  
  Reevaluate the expressions corresponding to the variable object
  @var{name} and all its direct and indirect children, and return the
! list of variable objects whose values have changed. Here,
! ``changed'' means that the result of @code{-var-evaluate-expression} before
! and after the @code{-var-update} is different.  If @samp{*} is used
! as the variable object names, all existing variable objects are
! updated.  The option @var{print-values} determines whether both names 
! and values, or just names are printed.  The possible values of
! this options are the same as for @code{-var-list-children}
! (@pxref{-var-list-children}).  It is recommended to use the
! @samp{--all-values} option, to reduce the number of MI commands needed
! on each program stop.
  
  
  @subsubheading Example
--- 19976,19991 ----
  
  Reevaluate the expressions corresponding to the variable object
  @var{name} and all its direct and indirect children, and return the
! list of variable objects whose values have changed; @var{name} must
! be a root variable object.  Here, ``changed'' means that the result of
! @code{-var-evaluate-expression} before and after the
! @code{-var-update} is different.  If @samp{*} is used as the variable
! object names, all existing variable objects are updated.  The option
! @var{print-values} determines whether both names and values, or just
! names are printed.  The possible values of this options are the same
! as for @code{-var-list-children} (@pxref{-var-list-children}).  It is
! recommended to use the @samp{--all-values} option, to reduce the
! number of MI commands needed on each program stop.
  
  
  @subsubheading Example
*************** type_changed="false"@}]
*** 19997,20002 ****
--- 20001,20029 ----
  (gdb)
  @end smallexample
  
+ @anchor{-var-update} 
+ The field in_scope may take three values:
+ 
+ @table @code
+ @item "true"
+ The variable object's current value is valid.
+ 
+ @item "false"
+ The variable object does not currently hold a valid value but it may
+ hold one in the future if its associated expression comes back into
+ scope.
+ 
+ @item "invalid"
+ The variable object no longer holds a valid value.
+ This can occur when the executable file being debugged has changed,
+ either through recompilation or by using the @value{GDBN} @code{file}
+ command.  The front end should normally choose to delete these variable
+ objects.
+ @end table
+ 
+ In the future new values may be added to this list so the front should
+ be prepared for this possibility.  @xref{GDB/MI Development and Front Ends, ,@sc{GDB/MI} Development and Front Ends}.
+ 
  @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  @node GDB/MI Data Manipulation
  @section @sc{gdb/mi} Data Manipulation


  reply	other threads:[~2007-02-13  0:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23 12:32 Denis PILAT
2007-01-23 12:45 ` Daniel Jacobowitz
2007-01-23 12:52   ` Vladimir Prus
2007-01-23 14:49     ` Denis PILAT
2007-01-24 21:49       ` Nick Roberts
2007-01-24 22:07         ` Daniel Jacobowitz
2007-01-24 22:08         ` Frédéric Riss
2007-01-24 22:18           ` Nick Roberts
2007-01-24 22:52             ` Frédéric Riss
2007-01-24 23:14               ` Nick Roberts
2007-01-25  2:41             ` Daniel Jacobowitz
2007-01-25 20:50               ` Nick Roberts
2007-01-26  7:25                 ` Denis PILAT
2007-01-23 17:20   ` Denis PILAT
2007-01-25 17:28     ` Denis PILAT
2007-01-25 22:31       ` Nick Roberts
2007-01-25 23:27         ` Daniel Jacobowitz
2007-01-29 12:39           ` Denis PILAT
2007-01-29 22:12             ` Nick Roberts
2007-01-30  8:49               ` Denis PILAT
2007-01-31 19:07               ` Denis PILAT
2007-01-31 21:29                 ` Nick Roberts
2007-02-01  9:49                   ` Denis PILAT
2007-02-08 16:41                     ` Daniel Jacobowitz
2007-02-08 19:33                       ` Nick Roberts
2007-02-08 19:55                         ` Daniel Jacobowitz
2007-02-09 15:43                         ` Eli Zaretskii
2007-02-12 21:10                           ` Denis PILAT
2007-02-13  0:11                             ` Nick Roberts [this message]
2007-02-13  8:26                               ` Denis PILAT
2007-02-20 16:06                             ` Andreas Schwab
2007-02-20 16:17                               ` Denis PILAT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17873.537.58649.22396@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=denis.pilat@st.com \
    --cc=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox