From 50ea05de19163733d1f223a8ab173b854fd9348c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:52:05 +0000 Subject: import crash-ptdump-command-1.0.3-2.el7 --- diff --git a/SOURCES/RPM_OPT_FLAGS.patch b/SOURCES/RPM_OPT_FLAGS.patch new file mode 100644 index 0000000..2e61802 --- /dev/null +++ b/SOURCES/RPM_OPT_FLAGS.patch @@ -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 diff --git a/SOURCES/ring_buffer_scope.patch b/SOURCES/ring_buffer_scope.patch new file mode 100644 index 0000000..869b25d --- /dev/null +++ b/SOURCES/ring_buffer_scope.patch @@ -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); diff --git a/SPECS/crash-ptdump-command.spec b/SPECS/crash-ptdump-command.spec index f05f06d..90a1230 100644 --- a/SPECS/crash-ptdump-command.spec +++ b/SPECS/crash-ptdump-command.spec @@ -4,7 +4,7 @@ Summary: ptdump extension module for the crash utility Name: crash-ptdump-command Version: 1.0.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: Development/Debuggers Source: ptdump-%{version}.tar.gz @@ -14,6 +14,8 @@ 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 %description Retrieve and decode the log buffer generated by the Intel(R) Processor @@ -21,6 +23,8 @@ Trace facility %prep %setup -q -n ptdump-%{version} +%patch0 -p1 -b RPM_OPT_FLAGS.patch +%patch1 -p1 -b ring_buffer_scope.patch %build make -f ptdump.mk @@ -40,6 +44,12 @@ rm -Rf $RPM_BUILD_ROOT %doc COPYING %changelog +* Wed May 31 2017 Dave Anderson - 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 - 1.0.3-1.el7 - Fix for coverity scan issues generated by 1.0.2 Resolves: rhbz#1298172