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: -var-info-path-expression


On Mon, Jun 18, 2007 at 02:42:59PM +0400, Vladimir Prus wrote:
> 
> The attached patch is a revised, and updated for mainline,
> version of my earlier patch to add -var-info-path-expression.
> The review of the previous version is at:
> 
> 	http://article.gmane.org/gmane.comp.gdb.patches/32582
> 
> and asks for: 
> 
> 	1. _() in some places.
> 	2. Not using of name of gdb function in mi error messages
> 	3. Points that path_expr != NULL implies it's not a root
> 	varobj.
> 
> Those changes were made.

Is this the right version of the patch?  I was going to say it was OK,
with documentation, and a few small changes - but that's the list of
small changes above.  For instance:

> +  if (argc != 1)
> +    error ("mi_cmd_var_info_path_expression: Usage: NAME.");

And these two that disagree:

> -      var->name = savestring (expression, strlen (expression));
> +      expr_len = strlen (expression);
> +      var->name = savestring (expression, expr_len);
> +      /* For a root var, the name and the expr are the same.  */
> +      var->path_expr = savestring (expression, expr_len);

> +  if (var->path_expr != NULL)
> +    return var->path_expr;
> +  else if (is_root_p (var))
> +    return var->name;
> +  else
> +    {
> +      return (*var->root->lang->path_expr_of_child) (var);
> +    }

Anyway, other than that and some comment formatting, it looks fine to me.

-- 
Daniel Jacobowitz
CodeSourcery


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