patches/gdb/6.7.1/200-deleted-children.patch
changeset 746 b150d6f590fc
parent 570 301eb285ae7d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gdb/6.7.1/200-deleted-children.patch	Mon Jul 28 21:08:01 2008 +0000
     1.3 @@ -0,0 +1,26 @@
     1.4 +Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/50_all_gdb-deleted-children.patch
     1.5 +-= BEGIN original header =-
     1.6 +http://bugs.gentoo.org/210636
     1.7 +http://sourceware.org/ml/gdb-patches/2007-11/msg00136.html
     1.8 +
     1.9 +2007-11-07  Vladimir Prus  <vladimir@codesourcery.com>
    1.10 +
    1.11 +	Fix crash when a variable object being deleted
    1.12 +	has any of its children deleted previously.
    1.13 +	
    1.14 +	* varobj.c (delete_variable_1): Don't recurse
    1.15 +	into deleted children.
    1.16 +
    1.17 +-= END original header =-
    1.18 +diff -durN gdb-6.7.1.orig/gdb/varobj.c gdb-6.7.1/gdb/varobj.c
    1.19 +--- gdb-6.7.1.orig/gdb/varobj.c	2007-08-31 21:01:17.000000000 +0200
    1.20 ++++ gdb-6.7.1/gdb/varobj.c	2008-06-17 23:27:45.000000000 +0200
    1.21 +@@ -1295,6 +1295,8 @@
    1.22 +   for (i = 0; i < VEC_length (varobj_p, var->children); ++i)
    1.23 +     {   
    1.24 +       varobj_p child = VEC_index (varobj_p, var->children, i);
    1.25 ++      if (!child)
    1.26 ++	continue;
    1.27 +       if (!remove_from_parent_p)
    1.28 + 	child->parent = NULL;
    1.29 +       delete_variable_1 (resultp, delcountp, child, 0, only_children_p);