This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 10/12] Match dynamic="1" in the output of -var-list-children
- From: Keith Seitz <keiths at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Thu, 24 Apr 2014 13:50:47 -0700
- Subject: Re: [PATCH 10/12] Match dynamic="1" in the output of -var-list-children
- Authentication-results: sourceware.org; auth=none
- References: <1392367471-13527-1-git-send-email-yao at codesourcery dot com> <1392367471-13527-11-git-send-email-yao at codesourcery dot com>
On 02/14/2014 12:44 AM, Yao Qi wrote:
I am not satisfied with the regexp construction for each child in
mi_child_regexp.
Welcome, like-minded contributor! :-)
will be rewritten to:
mi_list_varobj_children "struct_declarations" {
{struct_declarations.integer integer 0 {type int}}
} "test"
if we want to match "dynamic" attribute, we can write:
mi_list_varobj_children "struct_declarations" {
{struct_declarations.integer integer 0 {type int dynamic 1}}
} "test"
Since mi_list_varobj_children has been widely used in test suite, I'd
like to defer the change after this patch series.
There are a number of different strategies for testing varobj in the
test suite. Not too long ago, I added another which uses "trees" not
altogether unlike what you are proposing.
Have you looked into varobj_tree stuff in the test suite? Does it fit
your needs? If so, it might be better to use this facility and (start
to) deprecate the mi_list_varobj_children interface.
V2:
- Remove empty 'else' block.
gdb/testsuite:
2014-02-14 Yao Qi <yao@codesourcery.com>
* lib/mi-support.exp (mi_child_regexp): Append 'dynamic="1"' to
children_exp.
This looks okay to me; I recommend a maintainer approve this.
Keith