From 942754c5344bf05aca6eed296a1f059cde7777ff Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 26 May 2022 06:44:59 -0400 Subject: [PATCH] Auto sync2gitlab import of dwarves-1.22-1.el8.src.rpm --- .gitignore | 1 + EMPTY | 1 - dwarves.spec | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 EMPTY create mode 100644 dwarves.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f347798 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/dwarves-1.22.tar.xz diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/dwarves.spec b/dwarves.spec new file mode 100644 index 0000000..35041e8 --- /dev/null +++ b/dwarves.spec @@ -0,0 +1,151 @@ +%define libname libdwarves +%define libver 1 + +Name: dwarves +Version: 1.22 +Release: 1%{?dist} +License: GPLv2 +Summary: Debugging Information Manipulation Tools (pahole & friends) +URL: http://acmel.wordpress.com +Source: http://fedorapeople.org/~acme/dwarves/%{name}-%{version}.tar.xz +Requires: %{libname}%{libver} = %{version}-%{release} +BuildRequires: gcc +BuildRequires: cmake +BuildRequires: zlib-devel +BuildRequires: elfutils-devel >= 0.130 + +%description +dwarves is a set of tools that use the debugging information inserted in +ELF binaries by compilers such as GCC, used by well known debuggers such as +GDB, and more recent ones such as systemtap. + +Utilities in the dwarves suite include pahole, that can be used to find +alignment holes in structs and classes in languages such as C, C++, but not +limited to these. + +It also extracts other information such as CPU cacheline alignment, helping +pack those structures to achieve more cache hits. + +These tools can also be used to encode and read the BTF type information format +used with the Linux kernel bpf syscall, using 'pahole -J' and 'pahole -F btf'. + +A diff like tool, codiff can be used to compare the effects changes in source +code generate on the resulting binaries. + +Another tool is pfunct, that can be used to find all sorts of information about +functions, inlines, decisions made by the compiler about inlining, etc. + +One example of pfunct usage is in the fullcircle tool, a shell that drivers +pfunct to generate compileable code out of a .o file and then build it using +gcc, with the same compiler flags, and then use codiff to make sure the +original .o file and the new one generated from debug info produces the same +debug info. + +Pahole also can be used to use all this type information to pretty print raw data +according to command line directions. + +Headers can have its data format described from debugging info and offsets from +it can be used to further format a number of records. + +The btfdiff utility compares the output of pahole from BTF and DWARF to make +sure they produce the same results. + +%package -n %{libname}%{libver} +Summary: Debugging information processing library + +%description -n %{libname}%{libver} +Debugging information processing library. + +%package -n %{libname}%{libver}-devel +Summary: Debugging information library development files +Requires: %{libname}%{libver} = %{version}-%{release} + +%description -n %{libname}%{libver}-devel +Debugging information processing library development files. + +%prep +%setup -q + +%build +%cmake -DCMAKE_BUILD_TYPE=Release . +make VERBOSE=1 %{?_smp_mflags} + +%install +rm -Rf %{buildroot} +make install DESTDIR=%{buildroot} + +%ldconfig_scriptlets -n %{libname}%{libver} + +%files +%doc README.ctracer +%doc README.btf +%doc changes-v1.19 +%doc NEWS +%{_bindir}/btfdiff +%{_bindir}/codiff +%{_bindir}/ctracer +%{_bindir}/dtagnames +%{_bindir}/fullcircle +%{_bindir}/pahole +%{_bindir}/pdwtags +%{_bindir}/pfunct +%{_bindir}/pglobal +%{_bindir}/prefcnt +%{_bindir}/scncopy +%{_bindir}/syscse +%{_bindir}/ostra-cg +%dir %{_datadir}/dwarves/ +%dir %{_datadir}/dwarves/runtime/ +%dir %{_datadir}/dwarves/runtime/python/ +%defattr(0644,root,root,0755) +%{_mandir}/man1/pahole.1* +%{_datadir}/dwarves/runtime/Makefile +%{_datadir}/dwarves/runtime/linux.blacklist.cu +%{_datadir}/dwarves/runtime/ctracer_relay.c +%{_datadir}/dwarves/runtime/ctracer_relay.h +%attr(0755,root,root) %{_datadir}/dwarves/runtime/python/ostra.py* + +%files -n %{libname}%{libver} +%{_libdir}/%{libname}.so.* +%{_libdir}/%{libname}_emit.so.* +%{_libdir}/%{libname}_reorganize.so.* + +%files -n %{libname}%{libver}-devel +%doc MANIFEST README +%{_includedir}/dwarves/btf_encoder.h +%{_includedir}/dwarves/config.h +%{_includedir}/dwarves/ctf.h +%{_includedir}/dwarves/dutil.h +%{_includedir}/dwarves/dwarves.h +%{_includedir}/dwarves/dwarves_emit.h +%{_includedir}/dwarves/dwarves_reorganize.h +%{_includedir}/dwarves/elfcreator.h +%{_includedir}/dwarves/elf_symtab.h +%{_includedir}/dwarves/gobuffer.h +%{_includedir}/dwarves/hash.h +%{_includedir}/dwarves/libctf.h +%{_includedir}/dwarves/list.h +%{_includedir}/dwarves/rbtree.h +%{_libdir}/%{libname}.so +%{_libdir}/%{libname}_emit.so +%{_libdir}/%{libname}_reorganize.so + +%changelog +* Wed Oct 6 2021 Jiri Olsa - 1.22-1 +- moving to v1.22 version +- Resolves: rhbz#2010429 + +* Fri Apr 23 2021 Jiri Olsa - 1.21-0 +- moving to v1.21 version + +* Tue May 26 2020 Jiri Olsa - 1.17-1 +- moving to v1.17 version + +* Wed Nov 06 2019 Jiri Olsa - 1.15-5 +- Add libdwarves version dependency to dwarves package + +* Mon Nov 04 2019 Jiri Olsa - 1.15-4 +- CI rebuild + +* Wed Sep 25 2019 Jiri Olsa - 1.15-1 +- Initial build diff --git a/sources b/sources new file mode 100644 index 0000000..0d5174c --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (dwarves-1.22.tar.xz) = d45b19505cd59eb2cbb42304ab599661355a4085262cb202757822ec1c05476c851dea85e922f9421efb8a978ab475a6a6545757c6ab080f13ac77c5f7186606