This is the mail archive of the
mailing list for the GDB project.
Re: [patch 0/4] varobj_list replacement [Re: [patch 4/8] Types GC [varobj_list to all_root_varobjs]]
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 30 Jul 2009 10:45:51 +0400
- Subject: Re: [patch 0/4] varobj_list replacement [Re: [patch 4/8] Types GC [varobj_list to all_root_varobjs]]
- References: <20090525080233.GD13323@host0.dyn.jankratochvil.net> <20090710201104.GA7014@host0.dyn.jankratochvil.net> <email@example.com>
On Wednesday 29 July 2009 Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <firstname.lastname@example.org> writes:
> Volodya> Can we just make varobj.c expose vector of varobjs?
> Jan> In general iterators are preferred over direct variable access in
> Jan> modern programming.
> Yeah, but what about in gdb? ;)
> Jan> Still I would prefer:
> Jan> Iterator - so-called "safe" (keeping the next pointer) double link list:
> This patch (assuming it was the 4/4 patch) seemed pretty clean to me.
> I understand from other mail that this patch is a prerequisite to the
> type GC work. However, I don't understand in what way it is needed. I
> probably missed something... could you either explain it or tell me
> where to look?
In fact, I'm lost the big picture as well. If we want to optimize uninstall_variable,
then the 4/4 patch appears to be the simplest one that does the trick. However, if
that's a part of some bigger story, I'd be interested to understand it.