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: [RFA] Varobj trees


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.


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