This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Memory and gdb
- To: Tim Combs <tcombs at urbana dot css dot mot dot com>
- Subject: Re: Memory and gdb
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 07 Sep 2001 13:23:06 -0400
- Cc: gdb at sourceware dot cygnus dot com
- References: <20010907111048.C24826@urbana.css.mot.com>
> I have memory management questions. I thought the way to allocate
> memory in gdb was with xmalloc and to free it was xfree. (At least
> that's what the internals document says). But when I grep through
> the source, I can find xmalloc but no xfree. When I try to link
> I get xfree multiply defined. It seems to be found in readline and
> in utils.c. What's the proper way to free memory?
current gdb? you may have code from the transition.
> $ grep xfree *.c | wc -l
> 502
.