C++ related core dump

Daniel Jacobowitz drow@false.org
Thu Nov 17 14:04:00 GMT 2005


On Thu, Nov 17, 2005 at 10:45:11AM +0100, Mark Kettenis wrote:
> No, no, you misread that bit above.  antennac is an instance of class
> ROScalarColumn<int>.  So antennac(0) *is* an invocation of operator().

Oh.  Then what type IS the fsym?

> > GDB does _not_ support calling constructors, though.  This is a bit
> > tricky.
> > 
> > > Regardless of properly invoking operator(), we should do something
> > > about this crash.  Can we do something better than the attached patch?
> > 
> > > -      func_name	= cp_func_name (qualified_name);
> > > +      if (qualified_name)
> > > +	func_name = cp_func_name (qualified_name);
> > 
> > Return earlier if fsym is not a function?  Or this seems reasonable, to
> > avoid the crash.
> 
> Hmm the comment just below mentions C-style functions.  Doesn't
> SYMBOL_CPLUS_DEMANGLED_NAME (fsym) return NULL for C-style functions
> too?  In that case I think my patch is indeed the right approach.

Probably so, but let's work out what's going on first.

-- 
Daniel Jacobowitz
CodeSourcery, LLC



More information about the Gdb mailing list