Import rpm: c8s

This commit is contained in:
James Antill 2023-02-27 13:04:31 -05:00
commit 623bfea5ba
9 changed files with 662 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
SOURCES/dyninst-10.2.1.tar.gz
SOURCES/testsuite-10.1.0.tar.gz
/dyninst-10.2.1.tar.gz
/testsuite-10.1.0.tar.gz

317
dyninst-10.2.1-dbid.patch Normal file
View File

@ -0,0 +1,317 @@
Debuginfod is a lightweight web service that indexes ELF/DWARF debugging
resources by build-id and serves them over HTTP.
This patch enables dyninst to query debuginfod servers for a file's
separate debuginfo when it otherwise cannot be found.
This patch also adds a cmake option -DENABLE_DEBUGINFOD to control
whether dyninst is built with debuginfod support.
This requires having the debuginfod client library (libdebuginfod)
and header installed.
Debuginfod is distributed with elfutils, for more information see
https://sourceware.org/elfutils/Debuginfod.html
---
cmake/ElfUtils.cmake | 37 ++++++++---
cmake/Modules/FindLibDebuginfod.cmake | 76 +++++++++++++++++++++
cmake/options.cmake | 2 +
elf/CMakeLists.txt | 3 +
elf/src/Elf_X.C | 95 ++++++++++++++++++++-------
5 files changed, 178 insertions(+), 35 deletions(-)
create mode 100644 cmake/Modules/FindLibDebuginfod.cmake
--- dyninst-10.2.1/dyninst-10.2.1/cmake/ElfUtils.cmake
+++ dyninst-10.2.1/dyninst-10.2.1/cmake/ElfUtils.cmake
@@ -28,7 +28,7 @@
#
#======================================================================================
-if(LibElf_FOUND AND LibDwarf_FOUND)
+if(LibElf_FOUND AND LibDwarf_FOUND AND (LibDebuginfod_FOUND OR NOT ENABLE_DEBUGINFOD))
return()
endif()
@@ -37,7 +37,12 @@ if(NOT UNIX)
endif()
# Minimum acceptable version of elfutils
-set(_min_version 0.178)
+if(ENABLE_DEBUGINFOD)
+ set(_min_version 0.179)
+else()
+ set(_min_version 0.178)
+endif()
+
set(ElfUtils_MIN_VERSION ${_min_version}
CACHE STRING "Minimum acceptable elfutils version")
if(${ElfUtils_MIN_VERSION} VERSION_LESS ${_min_version})
@@ -62,7 +67,7 @@ set(ElfUtils_LIBRARYDIR "${ElfUtils_ROOT_DIR}/lib"
CACHE PATH "Hint directory that contains the elfutils library files")
# libelf/dwarf-specific directory hints
-foreach(l LibElf LibDwarf)
+foreach(l LibElf LibDwarf LibDebuginfod)
foreach(d ROOT_DIR INCLUDEDIR LIBRARYDIR)
set(${l}_${d} ${ElfUtils_${d}})
endforeach()
@@ -72,18 +77,30 @@ endforeach()
find_package(LibElf ${ElfUtils_MIN_VERSION})
-# Don't search for libdw if we didn't find a suitable libelf
+# Don't search for libdw or libdebuginfod if we didn't find a suitable libelf
if(LibElf_FOUND)
find_package(LibDwarf ${ElfUtils_MIN_VERSION})
+ if (ENABLE_DEBUGINFOD)
+ find_package(LibDebuginfod ${ElfUtils_MIN_VERSION})
+ endif()
endif()
# -------------- SOURCE BUILD -------------------------------------------------
-if(LibElf_FOUND AND LibDwarf_FOUND)
- set(_eu_root ${ElfUtils_ROOT_DIR})
- set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS})
- set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS})
- set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES})
+if(LibElf_FOUND AND LibDwarf_FOUND AND (NOT ENABLE_DEBUGINFOD OR LibDebuginfod_FOUND))
+ if(ENABLE_DEBUGINFOD AND LibDebuginfod_FOUND)
+ set(_eu_root ${ElfUtils_ROOT_DIR})
+ set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS} ${LibDebuginfod_INCLUDE_DIRS})
+ set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS} ${LibDebuginfod_LIBRARY_DIRS})
+ set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES} ${LibDebuginfod_LIBRARIES})
+ else()
+ set(_eu_root ${ElfUtils_ROOT_DIR})
+ set(_eu_inc_dirs ${LibElf_INCLUDE_DIRS} ${LibDwarf_INCLUDE_DIRS})
+ set(_eu_lib_dirs ${LibElf_LIBRARY_DIRS} ${LibDwarf_LIBRARY_DIRS})
+ set(_eu_libs ${LibElf_LIBRARIES} ${LibDwarf_LIBRARIES})
+ endif()
add_library(ElfUtils SHARED IMPORTED)
+elseif(ENABLE_DEBUGINFOD AND NOT LibDebuginfod_FOUND)
+ message(FATAL_ERROR "Debuginfod enabled but not found")
elseif(NOT (LibElf_FOUND AND LibDwarf_FOUND) AND STERILE_BUILD)
message(FATAL_ERROR "Elfutils not found and cannot be downloaded because build is sterile.")
else()
--- /dev/null
+++ dyninst-10.2.1/dyninst-10.2.1/cmake/Modules/FindLibDebuginfod.cmake
@@ -0,0 +1,76 @@
+#========================================================================================
+# FindDebuginfod
+# -----------
+#
+# Find debuginfod library and headers
+#
+# The module defines the following variables:
+#
+# This module reads hints about search locations from variables::
+#
+# LibDebuginfod_ROOT_DIR - Base directory the of libdebuginfod installation
+# LibDebuginfod_INCLUDEDIR - Hint directory that contains the libdebuginfod headers files
+# LibDebuginfod_LIBRARYDIR - Hint directory that contains the libdebuginfod library files
+#
+# and saves search results persistently in CMake cache entries::
+#
+# LibDebuginfod_FOUND - True if headers and requested libraries were found
+# LibDebuginfod_INCLUDE_DIRS - libdebuginfod include directories
+# LibDebuginfod_LIBRARY_DIRS - Link directories for libdebuginfod libraries
+# LibDebuginfod_LIBRARIES - libdebuginfod library files
+#
+# Utilize package config (e.g. /usr/lib64/pkgconfig/libdebuginfod.pc) to fetch
+# version information.
+#
+#========================================================================================
+
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_Debuginfod QUIET REQUIRED libdebuginfod>=${ElfUtils_MIN_VERSION})
+set(LibDebuginfod_VERSION "${PC_Debuginfod_VERSION}")
+
+find_path(LibDebuginfod_INCLUDE_DIRS
+ NAMES
+ debuginfod.h
+ HINTS
+ ${PC_Debuginfod_INCLUDEDIR}
+ ${PC_Debuginfod_INCLUDE_DIRS}
+ ${LibDebuginfod_ROOT_DIR}/include
+ ${LibDebuginfod_ROOT_DIR}
+ ${LibDebuginfod_INCLUDEDIR}
+ PATHS
+ ${DYNINST_SYSTEM_INCLUDE_PATHS}
+ PATH_SUFFIXES
+ ${_path_suffixes}
+ DOC
+ "libdebuginfod include directories")
+
+find_library(LibDebuginfod_LIBRARIES
+ NAMES
+ libdebuginfod.so.1 libdebuginfod.so
+ HINTS
+ ${PC_Debuginfod_LIBDIR}
+ ${PC_Debuginfod_LIBRARY_DIRS}
+ ${LibDebuginfod_ROOT_DIR}/lib
+ ${LibDebuginfod_ROOT_DIR}
+ ${LibDebuginfod_LIBRARYDIR}
+ PATHS
+ ${DYNINST_SYSTEM_LIBRARY_PATHS}
+ PATH_SUFFIXES
+ ${_path_suffixes})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibDebuginfod
+ FOUND_VAR
+ LibDebuginfod_FOUND
+ REQUIRED_VARS
+ LibDebuginfod_INCLUDE_DIRS
+ LibDebuginfod_LIBRARIES
+ VERSION_VAR
+ LibDebuginfod_VERSION)
+
+if(LibDebuginfod_FOUND)
+ set(LibDebuginfod_INCLUDE_DIRS ${LibDebuginfod_INCLUDE_DIRS})
+ set(LibDebuginfod_LIBRARIES ${LibDebuginfod_LIBRARIES})
+ get_filename_component(_debuginfod_dir ${LibDebuginfod_LIBRARIES} DIRECTORY)
+ set(LibDebuginfod_LIBRARY_DIRS ${_debuginfod_dir} "${_debuginfod_dir}/elfutils")
+endif()
--- dyninst-10.2.1/dyninst-10.2.1/cmake/options.cmake
+++ dyninst-10.2.1/dyninst-10.2.1/cmake/options.cmake
@@ -16,6 +16,8 @@ option(USE_COTIRE "Enable Cotire precompiled headers")
option (ENABLE_LTO "Enable Link-Time Optimization" OFF)
+option(ENABLE_DEBUGINFOD "Enable debuginfod support" OFF)
+
# Some global on/off switches
if (LIGHTWEIGHT_SYMTAB)
add_definitions (-DWITHOUT_SYMTAB_API -DWITH_SYMLITE)
--- dyninst-10.2.1/dyninst-10.2.1/elf/CMakeLists.txt
+++ dyninst-10.2.1/dyninst-10.2.1/elf/CMakeLists.txt
@@ -27,5 +27,8 @@ endif()
add_dependencies(dynElf ElfUtils)
target_link_private_libraries(dynElf ${ElfUtils_LIBRARIES})
+if (ENABLE_DEBUGINFOD AND LibDebuginfod_FOUND)
+ add_definitions(-DDEBUGINFOD_LIB)
+endif()
add_definitions(-DDYNELF_LIB)
--- dyninst-10.2.1/dyninst-10.2.1/elf/src/Elf_X.C
+++ dyninst-10.2.1/dyninst-10.2.1/elf/src/Elf_X.C
@@ -47,6 +47,9 @@
#include <sstream>
#include <libelf.h>
+#if DEBUGINFOD_LIB
+#include <elfutils/debuginfod.h>
+#endif
using namespace std;
using boost::crc_32_type;
@@ -1722,37 +1725,79 @@ bool Elf_X::findDebugFile(std::string origfilename, string &output_name, char* &
}
}
- if (debugFileFromDebugLink.empty())
- return false;
+ if (!debugFileFromDebugLink.empty()) {
+ char *mfPathNameCopy = strdup(origfilename.c_str());
+ string objectFileDirName = dirname(mfPathNameCopy);
- char *mfPathNameCopy = strdup(origfilename.c_str());
- string objectFileDirName = dirname(mfPathNameCopy);
+ vector<string> fnames = list_of
+ (objectFileDirName + "/" + debugFileFromDebugLink)
+ (objectFileDirName + "/.debug/" + debugFileFromDebugLink)
+ ("/usr/lib/debug/" + objectFileDirName + "/" + debugFileFromDebugLink);
- vector<string> fnames = list_of
- (objectFileDirName + "/" + debugFileFromDebugLink)
- (objectFileDirName + "/.debug/" + debugFileFromDebugLink)
- ("/usr/lib/debug/" + objectFileDirName + "/" + debugFileFromDebugLink);
+ free(mfPathNameCopy);
- free(mfPathNameCopy);
+ for(unsigned i = 0; i < fnames.size(); i++) {
+ bool result = loadDebugFileFromDisk(fnames[i], output_buffer, output_buffer_size);
+ if (!result)
+ continue;
- for(unsigned i = 0; i < fnames.size(); i++) {
- bool result = loadDebugFileFromDisk(fnames[i], output_buffer, output_buffer_size);
- if (!result)
- continue;
-
- boost::crc_32_type crcComputer;
- crcComputer.process_bytes(output_buffer, output_buffer_size);
- if(crcComputer.checksum() != debugFileCrc) {
- munmap(output_buffer, output_buffer_size);
- continue;
- }
+ boost::crc_32_type crcComputer;
+ crcComputer.process_bytes(output_buffer, output_buffer_size);
+ if(crcComputer.checksum() != debugFileCrc) {
+ munmap(output_buffer, output_buffer_size);
+ continue;
+ }
+
+ output_name = fnames[i];
+ cached_debug_buffer = output_buffer;
+ cached_debug_size = output_buffer_size;
+ cached_debug_name = output_name;
+ return true;
+ }
+ }
- output_name = fnames[i];
- cached_debug_buffer = output_buffer;
- cached_debug_size = output_buffer_size;
- cached_debug_name = output_name;
- return true;
+#ifdef DEBUGINFOD_LIB
+ if (!debugFileFromBuildID.empty()) {
+ // Given /usr/lib/debug/.buildid/XX/YYYYYY.debug, isolate XXYYYYYY.
+ size_t idx1 = debugFileFromBuildID.find_last_of("/");
+ size_t idx2 = debugFileFromBuildID.find_last_of(".");
+
+ if (idx1 == string::npos || idx2 == string::npos
+ || idx1 < 2 || idx1 > idx2)
+ return false;
+
+ idx1 -= 2;
+ string buildid(debugFileFromBuildID.substr(idx1, idx2 - idx1));
+ buildid.erase(2, 1);
+
+ debuginfod_client *client = debuginfod_begin();
+ if (client == NULL)
+ return false;
+
+ char *filename;
+ int fd = debuginfod_find_debuginfo(client,
+ (const unsigned char *)buildid.c_str(),
+ 0, &filename);
+ debuginfod_end(client);
+
+ if (fd >= 0) {
+ string fname = string(filename);
+ free(filename);
+ close(fd);
+
+ bool result = loadDebugFileFromDisk(fname,
+ output_buffer,
+ output_buffer_size);
+ if (result) {
+ output_name = fname;
+ cached_debug_buffer = output_buffer;
+ cached_debug_size = output_buffer_size;
+ cached_debug_name = output_name;
+ return true;
+ }
+ }
}
+#endif
return false;
}

11
dyninst-10.2.1-tbb.patch Normal file
View File

@ -0,0 +1,11 @@
--- dyninst-10.2.1/dyninst-10.2.1/cmake/ThreadingBuildingBlocks.cmake.orig 2019-05-16 14:40:05.000000000 -0400
+++ dyninst-10.2.1/dyninst-10.2.1/cmake/ThreadingBuildingBlocks.cmake 2019-05-30 10:45:15.128872098 -0400
@@ -50,7 +50,7 @@
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set(_tbb_min_version 2019.7)
else()
- set(_tbb_min_version 2018.6)
+ set(_tbb_min_version 2018.0)
endif()
set(TBB_MIN_VERSION ${_tbb_min_version} CACHE STRING "Minimum version of TBB (assumes a dotted-decimal format: YYYY.XX)")

13
dyninst-gcc11.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/testsuite-10.1.0/src/dyninst/test1_3.C b/testsuite-10.1.0/src/dyninst/test1_3.C
index d32f630..b9bd0ba 100644
--- a/testsuite-10.1.0/src/dyninst/test1_3.C
+++ b/testsuite-10.1.0/src/dyninst/test1_3.C
@@ -134,7 +134,7 @@ test_results_t test1_3_Mutator::executeTest()
}
// see if we can find the address
- if (expr3_1->getBaseAddr() <= 0)
+ if (expr3_1->getBaseAddr() == 0)
{
logerror("*Error*: address %p for %s is not valid\n",
expr3_1->getBaseAddr(), globalVar);

242
dyninst.spec Normal file
View File

@ -0,0 +1,242 @@
# For RHEL8 we need this before using any scl macro.
%global __python /usr/bin/python3
%{?scl:%scl_package dyninst}
Summary: An API for Run-time Code Generation
License: LGPLv2+
Name: %{?scl_prefix}dyninst
Group: Development/Libraries
Release: 2%{?dist}
URL: http://www.dyninst.org
Version: 10.2.1
Exclusiveos: linux
ExclusiveArch: %{ix86} x86_64 ppc64le aarch64
%define __testsuite_version 10.1.0
Source0: https://github.com/dyninst/dyninst/archive/v%{version}/dyninst-%{version}.tar.gz
Source1: https://github.com/dyninst/testsuite/archive/v%{__testsuite_version}/testsuite-%{__testsuite_version}.tar.gz
Patch1: dyninst-gcc11.patch
Patch2: dyninst-10.2.1-dbid.patch
Patch3: testsuite-10.1.0-gettid.patch
Patch4: testsuite-10.1.0-386.patch
Patch5: testsuite-10.1.0-throw.patch
Patch6: dyninst-10.2.1-tbb.patch
%global dyninst_base dyninst-%{version}
%global testsuite_base testsuite-%{__testsuite_version}
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: elfutils-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: elfutils-debuginfod-client-devel
BuildRequires: boost-devel
BuildRequires: binutils-devel
BuildRequires: cmake
BuildRequires: libtirpc-devel
BuildRequires: tbb tbb-devel
%{?scl:Requires: %scl_runtime}
# Extra requires just for the testsuite
# NB, there's no separate libstdc++-static for <=el6
%if 0%{?rhel} >= 7
BuildRequires: libstdc++-static
%endif
BuildRequires: gcc-gfortran glibc-static libxml2-devel
%if 0%{?rhel} == 6
# C++11 requires devtoolset gcc.
BuildRequires: %{?scl_prefix}gcc-c++
%endif
# Testsuite files should not provide/require anything
%{?filter_setup:
%filter_provides_in %{_libdir}/dyninst/testsuite/
%filter_requires_in %{_libdir}/dyninst/testsuite/
%filter_setup
}
%description
Dyninst is an Application Program Interface (API) to permit the insertion of
code into a running program. The API also permits changing or removing
subroutine calls from the application program. Run-time code changes are
useful to support a variety of applications including debugging, performance
monitoring, and to support composing applications out of existing packages.
The goal of this API is to provide a machine independent interface to permit
the creation of tools and applications that use run-time code patching.
%package doc
Summary: Documentation for using the Dyninst API
Group: Documentation
%description doc
dyninst-doc contains API documentation for the Dyninst libraries.
%package devel
Summary: Header files for compiling programs with Dyninst
Group: Development/System
Requires: %{?scl_prefix}dyninst = %{version}-%{release}
Requires: boost-devel
Requires: tbb-devel
%description devel
dyninst-devel includes the C header files that specify the Dyninst user-space
libraries and interfaces. This is required for rebuilding any program
that uses Dyninst.
%package static
Summary: Static libraries for the compiling programs with Dyninst
Group: Development/System
Requires: %{?scl_prefix}dyninst-devel = %{version}-%{release}
%description static
dyninst-static includes the static versions of the library files for
the dyninst user-space libraries and interfaces.
%package testsuite
Summary: Programs for testing Dyninst
Group: Development/System
Requires: %{?scl_prefix}dyninst = %{version}-%{release}
Requires: %{?scl_prefix}dyninst-devel = %{version}-%{release}
Requires: %{?scl_prefix}dyninst-static = %{version}-%{release}
Requires: glibc-static
%description testsuite
dyninst-testsuite includes the test harness and target programs for
making sure that dyninst works properly.
%prep
%setup -q -n %{name}-%{version} -c
%setup -q -T -D -a 1
%patch1 -p1 -b .gcc11
%patch2 -p1 -b .dbid
%patch3 -p1 -b .gettid
%patch4 -p1 -b .386
%patch5 -p1 -b .throw
%patch6 -p1 -b .tbb
# cotire seems to cause non-deterministic gcc errors
# https://bugzilla.redhat.com/show_bug.cgi?id=1420551
sed -i.cotire -e 's/USE_COTIRE true/USE_COTIRE false/' \
%{dyninst_base}/cmake/shared.cmake
%build
cd %{dyninst_base}
%if 0%{?rhel} == 6
# C++11 requires devtoolset gcc.
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
%endif
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
LDFLAGS="$LDFLAGS $RPM_LD_FLAGS"
%ifarch %{ix86}
CFLAGS="$CFLAGS -fno-lto -march=i686"
LDFLAGS="$LDFLAGS -fno-lto"
%endif
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS LDFLAGS
%cmake \
-DENABLE_STATIC_LIBS=1 \
-DENABLE_DEBUGINFOD=1 \
-DCMAKE_BUILD_TYPE:STRING=None \
-DINSTALL_LIB_DIR:PATH=%{_libdir}/dyninst \
-DINSTALL_INCLUDE_DIR:PATH=%{_includedir}/dyninst \
-DINSTALL_CMAKE_DIR:PATH=%{_libdir}/cmake/Dyninst \
-DBoost_NO_BOOST_CMAKE=ON \
-DCMAKE_SKIP_RPATH:BOOL=YES \
.
%make_build
# Hack to install dyninst nearby, so the testsuite can use it
make DESTDIR=../install install
find ../install -name '*.cmake' -execdir \
sed -i -e 's!%{_prefix}!../install&!' '{}' '+'
# cmake mistakenly looks for libtbb.so in the dyninst install dir
sed -i '/libtbb.so/ s/".*usr/"\/usr/' $PWD/../install%{_libdir}/cmake/Dyninst/commonTargets.cmake
cd ../%{testsuite_base}
%cmake \
-DDyninst_DIR:PATH=$PWD/../install%{_libdir}/cmake/Dyninst \
-DINSTALL_DIR:PATH=%{_libdir}/dyninst/testsuite \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DBoost_NO_BOOST_CMAKE=ON \
-DCMAKE_SKIP_RPATH:BOOL=YES \
.
%make_build
%install
cd %{dyninst_base}
%make_install
# It doesn't install docs the way we want, so remove them.
# We'll just grab the pdfs later, directly from the build dir.
rm -v %{buildroot}%{_docdir}/*-%{version}.pdf
cd ../%{testsuite_base}
%make_install
# Ugly hack to mask testsuite files from debuginfo extraction. Running the
# testsuite requires debuginfo, so extraction is useless. However, debuginfo
# extraction is still nice for the main libraries, so we don't want to disable
# it package-wide. The permissions are restored by attr(755,-,-) in files.
find %{buildroot}%{_libdir}/dyninst/testsuite/ \
-type f '!' -name '*.a' -execdir chmod 644 '{}' '+'
%files
%defattr(-,root,root,-)
%dir %{_libdir}/dyninst
%{_libdir}/dyninst/*.so.*
# dyninst mutators dlopen the runtime library
%{_libdir}/dyninst/libdyninstAPI_RT.so
%doc %{dyninst_base}/COPYRIGHT
%doc %{dyninst_base}/LICENSE.md
%files doc
%defattr(-,root,root,-)
%doc %{dyninst_base}/dataflowAPI/doc/dataflowAPI.pdf
%doc %{dyninst_base}/dynC_API/doc/dynC_API.pdf
%doc %{dyninst_base}/dyninstAPI/doc/dyninstAPI.pdf
%doc %{dyninst_base}/instructionAPI/doc/instructionAPI.pdf
%doc %{dyninst_base}/parseAPI/doc/parseAPI.pdf
%doc %{dyninst_base}/patchAPI/doc/patchAPI.pdf
%doc %{dyninst_base}/proccontrol/doc/proccontrol.pdf
%doc %{dyninst_base}/stackwalk/doc/stackwalk.pdf
%doc %{dyninst_base}/symtabAPI/doc/symtabAPI.pdf
%files devel
%defattr(-,root,root,-)
%{_includedir}/dyninst
%{_libdir}/dyninst/*.so
%{_libdir}/cmake/Dyninst
%files static
%defattr(-,root,root,-)
%{_libdir}/dyninst/*.a
%files testsuite
%defattr(-,root,root,-)
%{_bindir}/parseThat
%dir %{_libdir}/dyninst/testsuite/
%attr(755,root,root) %{_libdir}/dyninst/testsuite/*[!a]
%attr(644,root,root) %{_libdir}/dyninst/testsuite/*.a
%changelog
* Fri Nov 06 2020 Stan Cox <scox@redhat.com> - 10.2.1-2
- Enable debuginfod
* Wed Oct 28 2020 Stan Cox <scox@redhat.com> - 10.2.1-1
- Update to 10.2.1
* Mon Jun 1 2020 Martin Cermak <mcermak@redhat.com> - 10.1.0-2
- NVR Bump and rebuild
* Sun Jun 9 2019 Stan Cox <scox@redhat.com> - 10.1.0-1
- Update to 10.1.0

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (dyninst-10.2.1.tar.gz) = 5666ffd888afdb9493bd495aa6027ca5b9f71fe811a6d88777d55b612c92f73dc6c008c1738be111175a31fb0a2ec804d8ffc3e79888d8366ae5b5b624537055
SHA512 (testsuite-10.1.0.tar.gz) = 47b91ebc0623f672378086a5f8d84e3934bd6b22d8932b12aaad257ccf7eb109505edb63dfbc3eb15aa099fc488a517835412099a77e3e0dd1275b3e3f672b3b

View File

@ -0,0 +1,44 @@
--- dyninst-10.2.0/testsuite-10.1.0/CMakeLists.txt
+++ dyninst-10.2.0/testsuite-10.1.0/CMakeLists.txt
@@ -111,7 +111,8 @@
if(UNIX)
enable_language(ASM-ATT)
- if("${DYNINST_PLATFORM}" MATCHES "i386")
- enable_language(ASM_NASM)
- endif()
+# nasm/yasm are deprecated
+# if("${DYNINST_PLATFORM}" MATCHES "i386")
+# enable_language(ASM_NASM)
+# endif()
elseif(WIN32)
enable_language(ASM_MASM)
--- dyninst-10.2.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
+++ dyninst-10.2.0/testsuite-10.1.0/src/instruction/test_instruction_farcall.C
@@ -96,21 +96,21 @@ test_results_t test_instruction_farcall_Mutator::executeTest()
if(decodedInsns.size() != expectedInsns) // six valid, one invalid
{
logerror("FAILED: Expected %d instructions, decoded %d\n", expectedInsns, decodedInsns.size());
- for(std::vector<Instruction::Ptr>::iterator curInsn = decodedInsns.begin();
+ for(std::vector<Instruction>::iterator curInsn = decodedInsns.begin();
curInsn != decodedInsns.end();
++curInsn)
{
- logerror("\t%s\t", (*curInsn)->format().c_str());
- for(unsigned j = 0; j < (*curInsn)->size(); ++j)
+ logerror("\t%s\t", (*curInsn).format().c_str());
+ for(unsigned j = 0; j < (*curInsn).size(); ++j)
{
- logerror("%x ", (*curInsn)->rawByte(j));
+ logerror("%x ", (*curInsn).rawByte(j));
}
logerror("\n");
}
return FAILED;
}
- if(decodedInsns.back() && decodedInsns.back()->isValid())
+ if(decodedInsns.size() > 0 && decodedInsns.back().isValid())
{
logerror("FAILED: Expected instructions to end with an invalid instruction, but they didn't");
return FAILED;

View File

@ -0,0 +1,15 @@
--- dyninst-10.1.0/testsuite-10.1.0/src/proccontrol/pcontrol_mutatee_tools.c.orig 2019-05-31 05:20:00.492379706 +0200
+++ dyninst-10.1.0/testsuite-10.1.0/src/proccontrol/pcontrol_mutatee_tools.c 2019-05-31 05:10:11.354826668 +0200
@@ -62,9 +62,9 @@
#if !defined(os_windows_test)
#include <poll.h>
-static unsigned int gettid(){
- return (unsigned int)pthread_self();
-}
+// static unsigned int gettid(){
+// return (unsigned int)pthread_self();
+// }
#endif
thread_t threads[MAX_POSSIBLE_THREADS];

View File

@ -0,0 +1,14 @@
--- dyninst-10.2.0/testsuite-10.1.0/src/test_lib.h
+++ dyninst-10.2.0/testsuite-10.1.0/src/test_lib.h
@@ -158,3 +158,3 @@
- TESTLIB_DLL_EXPORT virtual ~LocErr() THROW;
+ TESTLIB_DLL_EXPORT virtual ~LocErr() throw();
--- dyninst-10.2.0/testsuite-10.1.0/src/test_lib.C
+++ dyninst-10.2.0/testsuite-10.1.0/src/test_lib.C
@@ -112,3 +112,3 @@
-LocErr::~LocErr() THROW
+LocErr::~LocErr() throw()
{}