This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Varobj trees
- From: Doug Evans <dje at google dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Wed, 23 Nov 2011 10:04:38 -0800
- Subject: Re: [RFA] Varobj trees
- References: <4ECC08E2.5040301@redhat.com>
On Tue, Nov 22, 2011 at 12:41 PM, Keith Seitz <keiths@redhat.com> wrote:
> Hi,
>
> While working on testing for mi/10586, I got a little frustrated with how
> difficult it was to easily write varobj children tests, so I decided to do
> something about it.
>
> I've written some support routines which implement what I refer to as
> "varobj trees," which help take a lot of the tedium out of writing these
> tests. It isn't perfect, but it's a good start, IMO.
>
> A simple example (more elaborate example in the patch):
>
> C code:
>
> struct foo {
> ?int a;
> ?char *b;
> };
>
> struct foo *f;
>
>
> Tcl code:
>
> set code {
> ?{struct foo *} f {
> ? ?{struct foo} {*f} {
> ? ? ?int a {}
> ? ? ?{char *} b {
> ? ? ? ?char {*b} {}
> ? ? ?}
> ? ?}
> ?}
> }
>
> mi_walk_varobj_tree $tree
>
> Comments?
>
> Keith
>
> testsuite/ChangeLog
> 2011-11-22 ?Keith Seitz ?<keiths@redhat.com>
>
> ? ? ? ?* lib/mi-support.exp (varobj_tree): New namespace and procs.
> ? ? ? ?(mi_varobj_tree_test_children_callback): New proc.
> ? ? ? ?(mi_walk_varobj_tree): New proc.
>
LGTM.