Magellan Linux

Annotation of /trunk/gdb/patches/gdb-6.7.1-deleted-children.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 556 - (hide annotations) (download)
Mon Mar 31 11:07:12 2008 UTC (16 years, 1 month ago) by niro
File size: 969 byte(s)
-fixes a crash

1 niro 556 http://bugs.gentoo.org/210636
2     http://sourceware.org/ml/gdb-patches/2007-11/msg00136.html
3    
4     2007-11-07 Vladimir Prus <vladimir@codesourcery.com>
5    
6     Fix crash when a variable object being deleted
7     has any of its children deleted previously.
8    
9     * varobj.c (delete_variable_1): Don't recurse
10     into deleted children.
11    
12     Index: varobj.c
13     ===================================================================
14     RCS file: /cvs/src/src/gdb/varobj.c,v
15     retrieving revision 1.96
16     retrieving revision 1.97
17     diff -u -p -r1.96 -r1.97
18     --- gdb/varobj.c 27 Sep 2007 18:04:12 -0000 1.96
19     +++ gdb/varobj.c 7 Nov 2007 20:06:29 -0000 1.97
20     @@ -1292,6 +1292,8 @@ delete_variable_1 (struct cpstack **resu
21     for (i = 0; i < VEC_length (varobj_p, var->children); ++i)
22     {
23     varobj_p child = VEC_index (varobj_p, var->children, i);
24     + if (!child)
25     + continue;
26     if (!remove_from_parent_p)
27     child->parent = NULL;
28     delete_variable_1 (resultp, delcountp, child, 0, only_children_p);