import crash-ptdump-command-1.0.3-4.el8

This commit is contained in:
CentOS Sources 2019-05-07 07:41:38 -04:00 committed by Andrew Lukoshko
commit 091b5698be
6 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1 @@
8f95c3ba0754eb8424c361d26253e527951dc491 SOURCES/ptdump-1.0.3.tar.gz

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/ptdump-1.0.3.tar.gz

View File

@ -0,0 +1,11 @@
--- ptdump-1.0.3/ptdump.mk.orig
+++ ptdump-1.0.3/ptdump.mk
@@ -43,7 +43,7 @@ ptdump.so: $(TARGET_CFILES) $(INCDIR)/de
ifeq ($(ARCH),UNSUPPORTED)
@echo "ptdump: architecture not supported"
else
- gcc $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic -o $@ $(TARGET_CFILES)
+ gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic -o $@ $(TARGET_CFILES)
endif
debug: COMMON_CFLAGS+=-DDEBUG

11
SOURCES/rhel8_build.patch Normal file
View File

@ -0,0 +1,11 @@
--- ptdump-1.0.3/ptdump.mk.orig
+++ ptdump-1.0.3/ptdump.mk
@@ -43,7 +43,7 @@ ptdump.so: $(TARGET_CFILES) $(INCDIR)/de
ifeq ($(ARCH),UNSUPPORTED)
@echo "ptdump: architecture not supported"
else
- gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic -o $@ $(TARGET_CFILES)
+ gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic -o $@ $(TARGET_CFILES) -Wl,-z,now
endif
debug: COMMON_CFLAGS+=-DDEBUG

View File

@ -0,0 +1,17 @@
--- ptdump-1.0.3/ptdump.c.orig
+++ ptdump-1.0.3/ptdump.c
@@ -502,6 +502,14 @@ cmd_ptdump(void)
return;
}
+ /*
+ * Set the gdb scope to ensure that the appropriate ring_buffer
+ * structure is selected.
+ */
+ if (kernel_symbol_exists("perf_mmap_to_page"))
+ gdb_set_crash_scope(symbol_value("perf_mmap_to_page"),
+ "perf_mmap_to_page");
+
online_cpus = get_cpus_online();
list_len = sizeof(struct pt_info)*kt->cpus;
pt_info_list = malloc(list_len);

View File

@ -0,0 +1,76 @@
#
# crash core analysis suite
#
Summary: ptdump extension module for the crash utility
Name: crash-ptdump-command
Version: 1.0.3
Release: 4%{?dist}
License: GPLv2
Group: Development/Debuggers
Source: ptdump-%{version}.tar.gz
URL: http://people.redhat.com/anderson/extensions/ptdump-%{version}.tar.gz
ExclusiveOS: Linux
ExclusiveArch: x86_64
Buildroot: %{_tmppath}/%{name}-root
BuildRequires: crash-devel >= 5.1.5
Requires: crash >= 5.1.5
Patch0: RPM_OPT_FLAGS.patch
Patch1: ring_buffer_scope.patch
Patch2: rhel8_build.patch
%description
Retrieve and decode the log buffer generated by the Intel(R) Processor
Trace facility
%prep
%setup -q -n ptdump-%{version}
%patch0 -p1 -b RPM_OPT_FLAGS.patch
%patch1 -p1 -b ring_buffer_scope.patch
%patch2 -p1 -b rhel8_build.patch
%build
make -f ptdump.mk
%install
rm -Rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}%{_libdir}/crash/extensions/
cp %{_builddir}/ptdump-%{version}/ptdump.so %{buildroot}%{_libdir}/crash/extensions/
%clean
rm -rf %{buildroot}
rm -Rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_libdir}/crash/extensions/ptdump.so
%doc COPYING
%changelog
* Wed Sep 19 2018 Dave Anderson <anderson@redhat.com> - 1.0.3-4
- Address annocheck link issue
Resolves: rhbz#1630557
* Mon Aug 13 2018 Dave Anderson <anderson@redhat.com> - 1.0.3-3
- Bump release for mass rebuild
Resolves: rhbz#1615510
* Wed May 31 2017 Dave Anderson <anderson@redhat.com> - 1.0.3-2.el7
- Add RPM_OPT_FLAGS to gcc line in ptdump.mk
Resolves: rhbz#1450708
- Set gdb scope to get appropriate ring_buffer structure
Resolves: rhbz#1451181
* Tue Mar 15 2016 Dave Anderson <anderson@redhat.com> - 1.0.3-1.el7
- Fix for coverity scan issues generated by 1.0.2
Resolves: rhbz#1298172
* Mon Mar 14 2016 Dave Anderson <anderson@redhat.com> - 1.0.2-1.el7
- Memory leak fix and coverity scan fixes.
Resolves: rhbz#1298172
* Mon Feb 29 2016 Dave Anderson <anderson@redhat.com> - 1.0.1-1.el7
- Initial check-in.
Resolves: rhbz#1298172
* Tue Jan 26 2016 MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com> - 1.0.1-1
- Initial crash-ptdump-command package