Go to file
Arnaldo Carvalho de Melo 3de722e9ab dwarves: Delete list entries in reverse order
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>
2009-08-19 10:32:49 -03:00
cmake/modules cmake: Add comments explaining build_id and fedora/rh detection 2009-06-27 13:32:20 -03:00
lib [LICENSE]: Add COPYING file and add missing license info on some files 2007-12-17 14:15:42 -02:00
man-pages pahole: Allow list of class names to be passed to -C/--class_name 2009-06-18 14:58:51 -03:00
ostra [OSTRA]: Change ostra-cg license to GPLv2 2007-12-24 12:25:17 -02:00
rpm/SPECS dwarves: Add an rbtree for the functions in a cu 2009-06-04 14:56:44 -03:00
CMakeLists.txt cmake: set policy for escaping preprocessor definitions to NEW 2009-06-17 13:05:44 -03:00
COPYING [LICENSE]: Add COPYING file and add missing license info on some files 2007-12-17 14:15:42 -02:00
MANIFEST dwarves: Add an rbtree for the functions in a cu 2009-06-04 14:56:44 -03:00
NEWS [NEWS]: Update entry about the --separator new option 2007-05-23 16:27:33 -03:00
README [CMAKE]: Make the default install prefix be /usr/local 2007-04-19 18:01:47 -03:00
README.ctracer ctracer: update README.ctracer, f9 has the dwarves 2008-10-29 08:54:53 -02:00
codiff.c codiff: Fix thinko 2009-07-06 14:00:44 -03:00
config.h.cmake [DWARVES] Fixes a FIXME relating to a missing elf (libdw) symbol check. 2008-02-12 21:08:49 -02:00
ctf.h libctf: Use the same coding style as the dwarves 2008-09-25 16:01:26 -03:00
ctf_encoder.c dwarves: Make all the tags that have an IP to be derived from ip_tag 2009-06-04 17:30:06 -03:00
ctf_encoder.h ctf: Include the initial implementation of a ctf encoder 2009-03-19 12:16:07 -03:00
ctf_loader.c dwarves: Pass the cu to destructors to free memory on the obstack 2009-08-18 18:21:20 -03:00
ctfdwdiff ctfdwdiff: Don't ask for variables and inline expansions in pfunct 2009-03-31 19:21:46 -03:00
ctracer.c dwarves: Pass the cu to destructors to free memory on the obstack 2009-08-18 18:21:20 -03:00
dtagnames.c dtagnames: Stop using cu__for_each_tag 2009-04-01 11:01:16 -03:00
dutil.c dutil: Convert strlist to use rb_trees 2009-06-18 14:02:29 -03:00
dutil.h dutil: Convert strlist to use rb_trees 2009-06-18 14:02:29 -03:00
dwarf_loader.c dwarves: Pass the cu to destructors to free memory on the obstack 2009-08-18 18:21:20 -03:00
dwarves.c dwarves: Delete list entries in reverse order 2009-08-19 10:32:49 -03:00
dwarves.h dwarves: Delete list entries in reverse order 2009-08-19 10:32:49 -03:00
dwarves_emit.c core: Stop using strings__ptr(strings, i) directly 2009-04-02 17:54:43 -03:00
dwarves_emit.h core: Stop using strings__ptr(strings, i) directly 2009-04-02 17:54:43 -03:00
dwarves_fprintf.c dwarves_fprintf: Revert experimentation with const rendering 2009-08-19 10:04:54 -03:00
dwarves_reorganize.c dwarves_reorganize: Fix class__demote_bitfields, we need power of two bytes 2009-08-16 12:26:33 -03:00
dwarves_reorganize.h class_member: cache the byte size of the member 2009-03-17 14:31:18 -03:00
elf_symtab.c dutil: Allow returning the section index in elf_section_by_name 2009-04-03 11:53:05 -03:00
elf_symtab.h elf_symtab: Add elf_sym__section helper 2009-04-03 11:56:03 -03:00
gobuffer.c gobuffer: Fix buffer expansion algorithm 2009-04-25 12:13:14 -03:00
gobuffer.h gobuffer: Introduce gobuffer__copy 2009-03-31 15:54:53 -03:00
hash.h [DWARVES]: Use a hash table for the tags in a CU 2008-02-11 11:47:17 -02:00
libctf.c dutil: Allow returning the section index in elf_section_by_name 2009-04-03 11:53:05 -03:00
libctf.h ctf: Plug debug_fmt_ops->strings__ptr 2009-04-02 17:55:17 -03:00
list.h coding style: remove trailing whitespaces, etc 2009-03-14 13:50:36 -03:00
pahole.c dwarves: Pass the cu to destructors to free memory on the obstack 2009-08-18 18:21:20 -03:00
pdwtags.c core: Stop using strings__ptr(strings, i) directly 2009-04-02 17:54:43 -03:00
pfunct.c dwarves: Allow avoiding loading addr information 2009-07-06 13:44:57 -03:00
pglobal.c all: Fix possible uninitialized variable uses 2009-05-04 15:50:06 -03:00
prefcnt.c dwarves: Make all the tags that have an IP to be derived from ip_tag 2009-06-04 17:30:06 -03:00
rbtree.c dwarves: Add an rbtree for the functions in a cu 2009-06-04 14:56:44 -03:00
rbtree.h dwarves: Add an rbtree for the functions in a cu 2009-06-04 14:56:44 -03:00
strings.c strings: Fix stupid pointer deref 2009-05-04 15:40:44 -03:00
strings.h coding style: remove trailing whitespaces, etc 2009-03-14 13:50:36 -03:00
syscse.c core: Stop using strings__ptr(strings, i) directly 2009-04-02 17:54:43 -03:00

README

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