This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GDB 4.16 dumps core with egcs-1.0


> 
> On Thu, 11 Dec 1997 tdowney@newscorp.com wrote:
> 
> > 
> > Hi folks
> > 
> > Has anyone else had trouble with gdb-4.16 and egcs-1.0 under Solaris
> > 2.6.  I recently recompiled gdb with egcs and now it dumps core every
> > time I run it.  The core dump does not occur until I actually finish
> > using gdb.
> > 
	...
> > 
> > Has anyone else seen this or have any suggestions?
> 
> Yes, I've seen this on linux and reported it here some time ago. I got a
> patch for gdb from Fred Fish but this patch didn't help. Since then I
> havn't heard anything. It would be nice if someone could post a solution.
> 
> ron

I don't have the gdb sources on my machine right now, but I had that
problem and fixed it. Actually I had a problem with gdbtk, and using the
gcc2.7.2 but it looks very similar to this. 
The thing is that by default gdb tries to use the GNU  
mmalloc package, to check for wrong memory operations. But some part of
the code (in the case of gdbtk was the tcl/tk libraries) ends up
allocating
the memory with the standard malloc (or receiving allocated memory from
some external library) and releasing it with the "traced" one (in the
original message you can see free() calling mfree() calling
mfree_check()).
If you re-compile gdb making sure it does not use the MMALLOC package it
should work fine. I'm not sure you can specify it using 'configure' but
you should be able to disable it changing a couple of definition in the
Makefile.

Sorry if I cannot be more specific, but I hope this will help.

-- Raffaele Sena
   http://www.aromatic.com/~raff/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]