patches/gdb/6.7.1/120-deleted-children.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Mar 03 17:41:59 2009 +0000 (2009-03-03)
changeset 1219 2b875ed306c2
parent 746 b150d6f590fc
permissions -rw-r--r--
Allow user to add a directory component in the sys-root path.
Rename CT_DEBUG_INSTALL_DIR to CT_DEBUGROOT_DIR (to match CT_SYSROOT_DIR).
As a side effect, fix creating lib64->lib symlinks.

/trunk/scripts/build/debug/100-dmalloc.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/400-ltrace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 6 3 3 0 +++---
/trunk/scripts/build/debug/500-strace.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/200-duma.sh | 6 3 3 0 +++---
/trunk/scripts/crosstool-NG.sh.in | 16 7 9 0 +++++++---------
/trunk/scripts/functions | 2 1 1 0 +-
/trunk/config/toolchain.in | 17 17 0 0 +++++++++++++++++
8 files changed, 34 insertions(+), 19 deletions(-)
     1 Original patch from gentoo: gentoo/src/patchsets/gdb/6.7.1/50_all_gdb-deleted-children.patch
     2 -= BEGIN original header =-
     3 http://bugs.gentoo.org/210636
     4 http://sourceware.org/ml/gdb-patches/2007-11/msg00136.html
     5 
     6 2007-11-07  Vladimir Prus  <vladimir@codesourcery.com>
     7 
     8 	Fix crash when a variable object being deleted
     9 	has any of its children deleted previously.
    10 	
    11 	* varobj.c (delete_variable_1): Don't recurse
    12 	into deleted children.
    13 
    14 -= END original header =-
    15 diff -durN gdb-6.7.1.orig/gdb/varobj.c gdb-6.7.1/gdb/varobj.c
    16 --- gdb-6.7.1.orig/gdb/varobj.c	2007-08-31 21:01:17.000000000 +0200
    17 +++ gdb-6.7.1/gdb/varobj.c	2008-06-17 23:27:45.000000000 +0200
    18 @@ -1295,6 +1295,8 @@
    19    for (i = 0; i < VEC_length (varobj_p, var->children); ++i)
    20      {   
    21        varobj_p child = VEC_index (varobj_p, var->children, i);
    22 +      if (!child)
    23 +	continue;
    24        if (!remove_from_parent_p)
    25  	child->parent = NULL;
    26        delete_variable_1 (resultp, delcountp, child, 0, only_children_p);