2007-08-29 Michael Snyder * gnu-v2-abi.c (gnuv2_value_rtti_type): Guard against null. Index: gnu-v2-abi.c =================================================================== RCS file: /cvs/src/src/gdb/gnu-v2-abi.c,v retrieving revision 1.25 diff -p -r1.25 gnu-v2-abi.c *** gnu-v2-abi.c 23 Aug 2007 18:08:33 -0000 1.25 --- gnu-v2-abi.c 29 Aug 2007 21:24:09 -0000 *************** gnuv2_value_rtti_type (struct value *v, *** 192,198 **** CORE_ADDR vtbl; struct minimal_symbol *minsym; struct symbol *sym; ! char *demangled_name; struct type *btype; if (full) --- 192,198 ---- CORE_ADDR vtbl; struct minimal_symbol *minsym; struct symbol *sym; ! char *demangled_name, *p; struct type *btype; if (full) *************** gnuv2_value_rtti_type (struct value *v, *** 252,258 **** /* If we just skip the prefix, we get screwed by namespaces */ demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI); ! *(strchr(demangled_name,' '))=0; /* Lookup the type for the name */ /* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */ --- 252,260 ---- /* If we just skip the prefix, we get screwed by namespaces */ demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI); ! p = strchr (demangled_name, ' '); ! if (p) ! *p = '\0'; /* Lookup the type for the name */ /* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */