It doesn't matter when using a traditional malloc/free allocator, but
with obstacks we need to do it in reverse order.
For the usual case where we successfully process an object this doesn't
matter, as when we started using obstacks we don't traverse all the tags
calling their destructors anymore, we just free the whole obstack in one
go.
Noticed when processing object files built from non-supported languages
such as FORTRAN and Pascal, where there are some DWARF tags that are not
supported, which makes the object file load to be prematurely aborted
and that calls destructors for things like classes and functions that in
turn free space for their parameter/member lists, which now have to be
done in reverse order.
We could just stop calling the destructors and then destroying the whole
obstack, but I think that partially processed files are a nice feature,
so keep the interface in a way that both obstacks and traditinal malloc
alocators can be used.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Build instructions:
1. install cmake
2. mkdir build
3. cd build
4. cmake -D__LIB=lib ..
5. make install
Default is to be installed on /usr/local, see rpm spec file for
installing on other places.
Known to work scenarios:
Mandriva Cooker:
cmake 2.4.5-1mdv2007.1
libelfutils1-devel 0.123-1mdv2007.1
Debian Unstable:
cmake 2.4.5-1
libdw-dev 0.123-2
Fedora Core 6:
cmake 2.4.5-2.fc6
elfutils-devel 0.126-1.fc6