This is the mail archive of the gdb-patches@sourceware.org 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: Cleanup varobj children handling


On Tue, Dec 26, 2006 at 11:49:14PM +0300, Vladimir Prus wrote:
> I personally find VEC_iterate to be less clear -- because it does not
> correspond to any iteration pattern in any language I know. Do you insist
> on using it?

No, this is OK to leave alone.  If you think of the integer index as
opaque, it's really not that unlike a C++ iterator; since we can't make
*ix work, we use two variables.


> +  /* If we're called when the list of children is not yet initialized,
> +     allocated enough elements in it.  */

Allocate, not allocated - this is what we're doing, not what we've
done.

> +      /* Push any children.  Use reverse order so that first
> +	 child is popped from the work stack first, and so
> +	 will be added to result first.  This does not
> +	 affect correctness, just "nicer".  */

"so that the first child"

> +	  /* Child may be NULL is explicitly deleted by -var-delete.  */

"if", not is.

> +      /* Update this variable, unless it's root, which is already
> +	 updated.  */

"unless it's a root"

Otherwise OK, with a changelog entry.

-- 
Daniel Jacobowitz
CodeSourcery


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