On Friday 05 January 2007 12:14, Vladimir Prus wrote: > > > This is lightly tested by hand, I'll write automated tests later. There's no docs > > > either -- again, will be written after discussion. > > > > > > There is a couple of issues with this patch: > > > > > > - I don't much like 'var-info-path-expression' name, but > > > naming of MI commands is not very important. > > > > True - I think it's fine. > > > > > - I'm not sure why we can't report full expression in the > > > output of -var-list-children. The code I have does not seem > > > very computationally expensive. > > > > Also true. If this would be more useful, I'd be happy to do it that > > way - would you still need -var-info-path-expression? > > No, I think -var-info-path-expression will not be needed then. Except if we > do it that way, we'll have "all of test are broken because they don't expect > an extra field" situation. Grr. I'm not sure what to do here. I guess I do know -- I don't care about minor interface details. It's more important to have this implemented than solving "attribute vs. command" question the right way, and therefore, using a separate command is fine. Do you want me to add docs/tests or you can review the current version of the patch, reposted here fore convenience? - Volodya Implement -var-info-path-expression. * mi/mi-cmds.h (mi_cmd_var_info_path_expression): Declare. * mi/mi-cmds.c (mi_cmds): Register var-info-path-expression. * mi/mi-cmd-var.c (mi_cmd_var_info_path_expression): New. * varobj.c (struct varobj): New field 'path_expr'. (c_path_expr_of_child, cplus_path_expr_of_child) (java_path_expr_of_child): New. (struct language_specific): New field path_expr_of_child. (varobj_create): Initialize the path_expr field. (varobj_get_path_expr): New. (new_variable): Initialize the path_expr field. (free_variable): Free the path_expr field. (adjust_value_for_children_access): New parameter WAS_TYPE. (c_number_of_children): Adjust. (c_describe_child): New parameter CFULL_EXPRESSION. Compute full expression. (c_value_of_child, c_type_of_child): Adjust. (cplus_number_of_children): Adjust. (cplus_describe_child): New parameter CFULL_EXPRESSION. Compute full expression. (cplus_name_of_child, cplus_value_of_child) (cplus_type_of_child): Adjust. * varobj.h (varobj_get_path_expr): Declare.