7ee4d9
%define libname libdwarves
7ee4d9
%define libver 1
7ee4d9
7ee4d9
Name: dwarves
7ee4d9
Version: 1.15
7ee4d9
Release: 5%{?dist}
7ee4d9
License: GPLv2
7ee4d9
Summary: Debugging Information Manipulation Tools (pahole & friends)
7ee4d9
URL: http://acmel.wordpress.com
7ee4d9
Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.xz
7ee4d9
Patch: 0001-fprintf-Fixup-handling-classes-with-no-members.patch
7ee4d9
Requires: %{libname}%{libver} = %{version}-%{release}
7ee4d9
BuildRequires: gcc
7ee4d9
BuildRequires: cmake
7ee4d9
BuildRequires: zlib-devel
7ee4d9
BuildRequires: elfutils-devel >= 0.130
7ee4d9
7ee4d9
%description
7ee4d9
dwarves is a set of tools that use the debugging information inserted in
7ee4d9
ELF binaries by compilers such as GCC, used by well known debuggers such as
7ee4d9
GDB, and more recent ones such as systemtap.
7ee4d9
7ee4d9
Utilities in the dwarves suite include pahole, that can be used to find
7ee4d9
alignment holes in structs and classes in languages such as C, C++, but not
7ee4d9
limited to these.
7ee4d9
7ee4d9
It also extracts other information such as CPU cacheline alignment, helping
7ee4d9
pack those structures to achieve more cache hits.
7ee4d9
7ee4d9
These tools can also be used to encode and read the BTF type information format
7ee4d9
used with the Linux kernel bpf syscall, using 'pahole -J' and 'pahole -F btf'.
7ee4d9
7ee4d9
A diff like tool, codiff can be used to compare the effects changes in source
7ee4d9
code generate on the resulting binaries.
7ee4d9
7ee4d9
Another tool is pfunct, that can be used to find all sorts of information about
7ee4d9
functions, inlines, decisions made by the compiler about inlining, etc.
7ee4d9
7ee4d9
%package -n %{libname}%{libver}
7ee4d9
Summary: Debugging information  processing library
7ee4d9
7ee4d9
%description -n %{libname}%{libver}
7ee4d9
Debugging information processing library.
7ee4d9
7ee4d9
%package -n %{libname}%{libver}-devel
7ee4d9
Summary: Debugging information library development files
7ee4d9
Requires: %{libname}%{libver} = %{version}-%{release}
7ee4d9
7ee4d9
%description -n %{libname}%{libver}-devel
7ee4d9
Debugging information processing library development files.
7ee4d9
7ee4d9
%prep
7ee4d9
%setup -q -c -n %{name}-%{version}
7ee4d9
%patch -p1
7ee4d9
7ee4d9
%build
7ee4d9
%cmake .
7ee4d9
make VERBOSE=1 %{?_smp_mflags}
7ee4d9
7ee4d9
%install
7ee4d9
rm -Rf %{buildroot}
7ee4d9
make install DESTDIR=%{buildroot}
7ee4d9
30b57a
%post -n %{libname}%{libver} -p /sbin/ldconfig
30b57a
	
30b57a
%postun -n %{libname}%{libver} -p /sbin/ldconfig
7ee4d9
7ee4d9
%files
7ee4d9
%doc README.ctracer
7ee4d9
%doc README.btf
7ee4d9
%doc NEWS
7ee4d9
%{_bindir}/btfdiff
7ee4d9
%{_bindir}/codiff
7ee4d9
%{_bindir}/ctracer
7ee4d9
%{_bindir}/dtagnames
7ee4d9
%{_bindir}/fullcircle
7ee4d9
%{_bindir}/pahole
7ee4d9
%{_bindir}/pdwtags
7ee4d9
%{_bindir}/pfunct
7ee4d9
%{_bindir}/pglobal
7ee4d9
%{_bindir}/prefcnt
7ee4d9
%{_bindir}/scncopy
7ee4d9
%{_bindir}/syscse
7ee4d9
%{_bindir}/ostra-cg
7ee4d9
%dir %{_datadir}/dwarves/
7ee4d9
%dir %{_datadir}/dwarves/runtime/
7ee4d9
%dir %{_datadir}/dwarves/runtime/python/
7ee4d9
%defattr(0644,root,root,0755)
7ee4d9
%{_mandir}/man1/pahole.1*
7ee4d9
%{_datadir}/dwarves/runtime/Makefile
7ee4d9
%{_datadir}/dwarves/runtime/linux.blacklist.cu
7ee4d9
%{_datadir}/dwarves/runtime/ctracer_relay.c
7ee4d9
%{_datadir}/dwarves/runtime/ctracer_relay.h
7ee4d9
%attr(0755,root,root) %{_datadir}/dwarves/runtime/python/ostra.py*
7ee4d9
7ee4d9
%files -n %{libname}%{libver}
7ee4d9
%{_libdir}/%{libname}.so.*
7ee4d9
%{_libdir}/%{libname}_emit.so.*
7ee4d9
%{_libdir}/%{libname}_reorganize.so.*
7ee4d9
7ee4d9
%files -n %{libname}%{libver}-devel
7ee4d9
%doc MANIFEST README
7ee4d9
%{_includedir}/dwarves/btf_encoder.h
7ee4d9
%{_includedir}/dwarves/config.h
7ee4d9
%{_includedir}/dwarves/ctf_encoder.h
7ee4d9
%{_includedir}/dwarves/ctf.h
7ee4d9
%{_includedir}/dwarves/dutil.h
7ee4d9
%{_includedir}/dwarves/dwarves.h
7ee4d9
%{_includedir}/dwarves/dwarves_emit.h
7ee4d9
%{_includedir}/dwarves/dwarves_reorganize.h
7ee4d9
%{_includedir}/dwarves/elfcreator.h
7ee4d9
%{_includedir}/dwarves/elf_symtab.h
7ee4d9
%{_includedir}/dwarves/gobuffer.h
7ee4d9
%{_includedir}/dwarves/hash.h
7ee4d9
%{_includedir}/dwarves/libbtf.h
7ee4d9
%{_includedir}/dwarves/libctf.h
7ee4d9
%{_includedir}/dwarves/list.h
7ee4d9
%{_includedir}/dwarves/rbtree.h
7ee4d9
%{_includedir}/dwarves/strings.h
7ee4d9
%{_libdir}/%{libname}.so
7ee4d9
%{_libdir}/%{libname}_emit.so
7ee4d9
%{_libdir}/%{libname}_reorganize.so
7ee4d9
7ee4d9
%changelog
7ee4d9
* Wed Nov 06 2019 Jiri Olsa <jolsa@redhat.com> - 1.15-5
7ee4d9
- Add libdwarves version dependency to dwarves package
7ee4d9
7ee4d9
* Mon Nov 04 2019 Jiri Olsa <jolsa@redhat.com> - 1.15-4
7ee4d9
- CI rebuild
7ee4d9
7ee4d9
* Wed Sep 25 2019 Jiri Olsa <jolsa@redhat.com> - 1.15-1
7ee4d9
- Initial build