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


Any comments on this yet? I believe we've discussed the rationale for
-var-info-path-expression command in the main list, and agreed that it's
necessary.

- Volodya

> Hello,
> the below patch ports the -var-info-path-expression MI command from Apple
> version. It allows on get expression corresponding to any variable object,
> in language-specific syntax, which can be used, for example, to set
> watchpoint  on that expression.
> 
> Top-level changelog entry:
> 
> 2006-03-17  Vladimir Prus <ghost@cs.msu.su>,
>    port of changes on Apple branch:
>    2002-03-28  James Ingham <jingham@apple.com>
> 
>         * varobj.c
>         (child_exists): Take child index, not child name, for performance.
>         (get_type_deref): Pass out whether the original was a pointer or
>          not.
>         (path_expr_of_variable): New function.  This returns the full path
>         expression to a variable.  The intent here is that you could use
>         this to make a new root varobj corresponding to the child varobj
>         whose path expression you are getting.
>         (varobj_get_path_expr): New function.  External wrapper for
>         path_expr_of_variable.
>         (c_path_expr_of_child, cplus_path_expr_of_child,
>         java_path_expr_of_child): New functions, return the path expr of a
>         child in its parent.  Also caches the expr for later use.
>         (is_root_p): New convenience function, returns whether a variable
>         is a root. Then I changed all the uses of var->name to use
>         name_of_variable, and the test
>         for is this a root were changed to use is_root_p.
> 
>         * varobj.h: (varobj_get_path_expr): New function definition.
> 
> 
> MI changelog entry:
> 
> 2006-03-17  Vladimir Prus <ghost@cs.msu.su>,
>    port of changes on Apple branch:
>    2002-03-28  James Ingham <jingham@apple.com>
> 
> 
>         * mi-cmds.h: Added def'n of mi_cmd_var_info_path_expression.
>         * mi-cmds.c: Added var-info-path-expression to command list.
>         * mi-cmd-var.c (mi_cmd_var_info_path_expression) New function,
>         the MI interface to varobj_get_path_expression.



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