[rfc] #include "gdb_obstack.h"

Andrew Cagney ac131313@ges.redhat.com
Tue Jul 2 12:29:00 GMT 2002


Hello,

The bcache stuff caused me to stumble across this (symtab.h):

> /* Some definitions and declarations to go with use of obstacks.  */
> 
> #include "obstack.h"
> #define obstack_chunk_alloc xmalloc
> #define obstack_chunk_free xfree

Other parts of GDB also include "obstack.h" but don't provide those 
definitions ....  I've always wondered how this worked - I knew obstack 
needed some stuff defined but never knew where that was done => good 
luck rather than good management :-)

I think this should be moved to a new file "gdb_obstack.h" and 
everything in GDB tweaked to include that.

(Unless someone beats me to it I'll try to cover this next week).

Andrew



More information about the Gdb-patches mailing list