[RFA] Updated path expression computations for varobj trees

Keith Seitz keiths@redhat.com
Thu Jan 5 20:05:00 GMT 2012


On 12/20/2011 07:23 AM, Tom Tromey wrote:
> I'm not super fond of the type regexp thing, but I suppose we can always
> enhance it more later if need be.

Ok, well, after fiddling with this far too much, I've (almost 
embarrassingly) whittled this regexp to:

+    if {[string index $name 0] == "*"} {
+      set is_compound 0
+    }

In other words, we assume that the construct is a compound type unless 
the child's name begins with "*", which means the parent must be a pointer.

We may encounter difficulties with this, too, mind you, but I believe 
this is a cheaper and easier condition to deal with than the regexp.

What do you think?

Keith

[Re-attaching whole patch for clarity. ChangeLog is still the same.]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: varobj_walk_tree_update-2.patch
Type: text/x-patch
Size: 4795 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120105/7b11c81a/attachment.bin>


More information about the Gdb-patches mailing list