--- crash-7.0.3.orig/debian/Makefile.ori +++ crash-7.0.3/debian/Makefile.ori @@ -0,0 +1,596 @@ +# Makefile for core analysis suite +# +# Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. +# www.missioncriticallinux.com, info@missioncriticallinux.com +# +# Copyright (C) 2002-2013 David Anderson +# Copyright (C) 2002-2013 Red Hat, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +PROGRAM=crash + +# +# Supported targets: X86 ALPHA PPC IA64 PPC64 +# TARGET and GDB_CONF_FLAGS will be configured automatically by configure +# +TARGET= +GDB_CONF_FLAGS= + +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +ifeq (${ARCH}, ppc64) +CONF_FLAGS = -m64 +endif + +# +# GDB, GDB_FILES, GDB_OFILES and GDB_PATCH_FILES will be configured automatically by configure +# +GDB=gdb-7.6 +GDB_FILES=${GDB_7.6_FILES} +GDB_OFILES= +GDB_PATCH_FILES=gdb-7.6.patch + +# +# Default installation directory +# +INSTALLDIR=${DESTDIR}/usr/bin + +# LDFLAGS will be configured automatically by configure +LDFLAGS= + +GENERIC_HFILES=defs.h xen_hyper_defs.h +MCORE_HFILES=va_server.h vas_crash.h +REDHAT_HFILES=netdump.h diskdump.h makedumpfile.h xendump.h kvmdump.h qemu-load.h +LKCD_DUMP_HFILES=lkcd_vmdump_v1.h lkcd_vmdump_v2_v3.h lkcd_dump_v5.h \ + lkcd_dump_v7.h lkcd_dump_v8.h +LKCD_OBSOLETE_HFILES=lkcd_fix_mem.h +LKCD_TRACE_HFILES=lkcd_x86_trace.h +IBM_HFILES=ibm_common.h +SADUMP_HFILES=sadump.h +UNWIND_HFILES=unwind.h unwind_i.h rse.h unwind_x86.h unwind_x86_64.h + +CFILES=main.c tools.c global_data.c memory.c filesys.c help.c task.c \ + kernel.c test.c gdb_interface.c configure.c net.c dev.c \ + alpha.c x86.c ppc.c ia64.c s390.c s390x.c s390dbf.c ppc64.c x86_64.c \ + arm.c arm64.c \ + extensions.c remote.c va_server.c va_server_v1.c symbols.c cmdline.c \ + lkcd_common.c lkcd_v1.c lkcd_v2_v3.c lkcd_v5.c lkcd_v7.c lkcd_v8.c\ + lkcd_fix_mem.c s390_dump.c lkcd_x86_trace.c \ + netdump.c diskdump.c makedumpfile.c xendump.c unwind.c unwind_decoder.c \ + unwind_x86_32_64.c unwind_arm.c \ + xen_hyper.c xen_hyper_command.c xen_hyper_global_data.c \ + xen_hyper_dump_tables.c kvmdump.c qemu.c qemu-load.c sadump.c ipcs.c + +SOURCE_FILES=${CFILES} ${GENERIC_HFILES} ${MCORE_HFILES} \ + ${REDHAT_CFILES} ${REDHAT_HFILES} ${UNWIND_HFILES} \ + ${LKCD_DUMP_HFILES} ${LKCD_TRACE_HFILES} ${LKCD_OBSOLETE_HFILES}\ + ${IBM_HFILES} ${SADUMP_HFILES} + +OBJECT_FILES=main.o tools.o global_data.o memory.o filesys.o help.o task.o \ + build_data.o kernel.o test.o gdb_interface.o net.o dev.o \ + alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o x86_64.o \ + arm.o arm64.o \ + extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o \ + lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \ + lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o \ + lkcd_x86_trace.o unwind_v1.o unwind_v2.o unwind_v3.o \ + unwind_x86_32_64.o unwind_arm.o \ + xen_hyper.o xen_hyper_command.o xen_hyper_global_data.o \ + xen_hyper_dump_tables.o kvmdump.o qemu.o qemu-load.o sadump.o ipcs.o + +MEMORY_DRIVER_FILES=memory_driver/Makefile memory_driver/crash.c memory_driver/README + +# These are the current set of crash extensions sources. They are not built +# by default unless the third command line of the "all:" stanza is uncommented. +# Alternatively, they can be built by entering "make extensions" from this +# directory. + +EXTENSIONS=extensions +EXTENSION_SOURCE_FILES=${EXTENSIONS}/Makefile ${EXTENSIONS}/echo.c ${EXTENSIONS}/dminfo.c \ + ${EXTENSIONS}/snap.c ${EXTENSIONS}/snap.mk ${EXTENSIONS}/trace.c \ + ${EXTENSIONS}/eppic.c ${EXTENSIONS}/eppic.mk + +DAEMON_OBJECT_FILES=remote_daemon.o va_server.o va_server_v1.o \ + lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \ + s390_dump.o netdump_daemon.o + +GDB_5.0_FILES=${GDB}/gdb/Makefile.in \ + ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \ + ${GDB}/gdb/blockframe.c ${GDB}/gdb/alpha-tdep.c \ + ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \ + ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/gnu-regex.c \ + ${GDB}/gdb/ppc-linux-nat.c +GDB_5.0_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o ${GDB}/gdb/target.o \ + ${GDB}/gdb/blockframe.o ${GDB}/gdb/alpha-tdep.o \ + ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \ + ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o ${GDB}/gdb/gnu-regex.o \ + ${GDB}/gdb/ppc-linux-nat.o + +GDB_5.1_FILES=${GDB}/gdb/Makefile.in \ + ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \ + ${GDB}/gdb/blockframe.c ${GDB}/gdb/alpha-tdep.c \ + ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \ + ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/gnu-regex.c +GDB_5.1_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o ${GDB}/gdb/target.o \ + ${GDB}/gdb/blockframe.o ${GDB}/gdb/alpha-tdep.o \ + ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \ + ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o ${GDB}/gdb/gnu-regex.o + +GDB_5.2.1_FILES=${GDB}/gdb/Makefile.in \ + ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \ + ${GDB}/gdb/blockframe.c ${GDB}/gdb/alpha-tdep.c \ + ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \ + ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c +GDB_5.2.1_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o ${GDB}/gdb/target.o \ + ${GDB}/gdb/blockframe.o ${GDB}/gdb/alpha-tdep.o \ + ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \ + ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o + +GDB_5.3post-0.20021129.36rh_FILES=${GDB}/gdb/Makefile.in \ + ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \ + ${GDB}/gdb/frame.c ${GDB}/gdb/alpha-tdep.c \ + ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \ + ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/dwarf2read.c +GDB_5.3post-0.20021129.36rh_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o \ + ${GDB}/gdb/target.o ${GDB}/gdb/frame.o ${GDB}/gdb/alpha-tdep.o \ + ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o ${GDB}/gdb/ui-file.o \ + ${GDB}/gdb/utils.o ${GDB}/gdb/dwarf2read.o + +GDB_6.0_FILES=${GDB}/gdb/Makefile.in ${GDB}/Makefile.in \ + ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \ + ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \ + ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c \ + ${GDB}/gdb/ppc-linux-tdep.c ${GDB}/sim/ppc/ppc-instructions \ + ${GDB}/bfd/simple.c ${GDB}/include/obstack.h +GDB_6.0_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o \ + ${GDB}/gdb/target.o ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \ + ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o \ + ${GDB}/gdb/ppc-linux-tdep.o ${GDB}/bfd/simple.o + +GDB_6.1_FILES=${GDB}/gdb/Makefile.in ${GDB}/Makefile.in \ + ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \ + ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \ + ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/dwarf2read.c \ + ${GDB}/include/obstack.h ${GDB}/gdb/ppc-linux-tdep.c +GDB_6.1_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o \ + ${GDB}/gdb/target.o ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \ + ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o ${GDB}/gdb/dwarf2read.o \ + ${GDB}/gdb/ppc-linux-tdep.o + +GDB_7.0_FILES= +GDB_7.0_OFILES=${GDB}/gdb/symtab.o + +GDB_7.3.1_FILES= +GDB_7.3.1_OFILES=${GDB}/gdb/symtab.o + +GDB_7.6_FILES= +GDB_7.6_OFILES=${GDB}/gdb/symtab.o + +# +# GDB_FLAGS is passed up from the gdb Makefile. +# +GDB_FLAGS= + +# +# WARNING_OPTIONS and WARNING_ERROR are both applied on a per-file basis. +# WARNING_ERROR is NOT used on files including "dirty" gdb headers so that +# successful compilations can be achieved with acceptable warnings; its +# usefulness is also dependent upon the processor's compiler -- your mileage +# may vary. +# +#WARNING_OPTIONS=-Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security +#WARNING_ERROR=-Werror + +# TARGET_CFLAGS will be configured automatically by configure +TARGET_CFLAGS= + +CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS} + +GPL_FILES=COPYING3 +TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \ + ${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES} +CSCOPE_FILES=${SOURCE_FILES} + +READLINE_DIRECTORY=./${GDB}/readline +BFD_DIRECTORY=./${GDB}/bfd +GDB_INCLUDE_DIRECTORY=./${GDB}/include + +REDHATFLAGS=-DREDHAT + +# target could be set on command line when invoking make. Like: make target=ARM +# otherwise target will be the same as the host +ifneq ($(target),) +CONF_TARGET_FLAG="-t$(target)" +endif + +# To build the extensions library by default, uncomment the third command +# line below. Otherwise they can be built by entering "make extensions". + +all: make_configure + @./configure ${CONF_TARGET_FLAG} -p "RPMPKG=${RPMPKG}" -b + @make --no-print-directory gdb_merge +# @make --no-print-directory extensions + +gdb_merge: force + @if [ ! -f ${GDB}/README ]; then \ + make --no-print-directory gdb_unzip; fi + @echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs + @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj + @rm -f ${PROGRAM} + @if [ ! -f ${GDB}/config.status ]; then \ + (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \ + --with-bugurl="" --with-expat=no --with-python=no; \ + make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \ + else (cd ${GDB}/gdb; make --no-print-directory CRASH_TARGET=${TARGET};); fi + @if [ ! -f ${PROGRAM} ]; then \ + echo; echo "${PROGRAM} build failed"; \ + echo; exit 1; fi + +gdb_unzip: + @rm -f gdb.files + @for FILE in ${GDB_FILES} dummy; do\ + echo $$FILE >> gdb.files; done + @if [ ! -f ${GDB}.tar.gz ] && [ -f /usr/bin/wget ]; then \ + wget http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi + @tar --exclude-from gdb.files -xvzmf ${GDB}.tar.gz + @make --no-print-directory gdb_patch + +gdb_patch: + if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \ + patch -p0 < ${GDB}.patch; fi + +library: make_build_data ${OBJECT_FILES} + ar -rs ${PROGRAM}lib.a ${OBJECT_FILES} + +gdb: force + rm -f ${GDB_OFILES} + @make --no-print-directory all + +force: + + +make_configure: force + @rm -f configure + @${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS} + +clean: make_configure + @./configure ${CONF_TARGET_FLAG} -q -b + @make --no-print-directory do_clean + +do_clean: + rm -f ${OBJECT_FILES} ${DAEMON_OBJECT_FILES} ${PROGRAM} ${PROGRAM}lib.a ${GDB_OFILES} + @(cd extensions; make --no-print-directory -i clean) + @(cd memory_driver; make --no-print-directory -i clean) + +make_build_data: force + ${CC} -c ${CRASH_CFLAGS} build_data.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +install: + /usr/bin/install ${PROGRAM} ${INSTALLDIR} +# /usr/bin/install ${PROGRAM}d ${INSTALLDIR} + +unconfig: make_configure + @./configure -u + +warn: make_configure + @./configure ${CONF_TARGET_FLAG} -w -b + @make --no-print-directory gdb_merge + +Warn: make_configure + @./configure ${CONF_TARGET_FLAG} -W -b + @make --no-print-directory gdb_merge + +nowarn: make_configure + @./configure ${CONF_TARGET_FLAG} -n -b + @make --no-print-directory gdb_merge + +main.o: ${GENERIC_HFILES} main.c + ${CC} -c ${CRASH_CFLAGS} main.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +cmdline.o: ${GENERIC_HFILES} cmdline.c + ${CC} -c ${CRASH_CFLAGS} cmdline.c -I${READLINE_DIRECTORY} ${WARNING_OPTIONS} ${WARNING_ERROR} + +tools.o: ${GENERIC_HFILES} tools.c + ${CC} -c ${CRASH_CFLAGS} tools.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +global_data.o: ${GENERIC_HFILES} global_data.c + ${CC} -c ${CRASH_CFLAGS} global_data.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +symbols.o: ${GENERIC_HFILES} symbols.c + ${CC} -c ${CRASH_CFLAGS} symbols.c -I${BFD_DIRECTORY} -I${GDB_INCLUDE_DIRECTORY} ${WARNING_OPTIONS} ${WARNING_ERROR} + +filesys.o: ${GENERIC_HFILES} filesys.c + ${CC} -c ${CRASH_CFLAGS} filesys.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +help.o: ${GENERIC_HFILES} help.c + ${CC} -c ${CRASH_CFLAGS} help.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +memory.o: ${GENERIC_HFILES} memory.c + ${CC} -c ${CRASH_CFLAGS} memory.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +test.o: ${GENERIC_HFILES} test.c + ${CC} -c ${CRASH_CFLAGS} test.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +task.o: ${GENERIC_HFILES} task.c + ${CC} -c ${CRASH_CFLAGS} task.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +kernel.o: ${GENERIC_HFILES} kernel.c + ${CC} -c ${CRASH_CFLAGS} kernel.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +gdb_interface.o: ${GENERIC_HFILES} gdb_interface.c + ${CC} -c ${CRASH_CFLAGS} gdb_interface.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +va_server.o: ${MCORE_HFILES} va_server.c + ${CC} -c ${CRASH_CFLAGS} va_server.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +va_server_v1.o: ${MCORE_HFILES} va_server_v1.c + ${CC} -c ${CRASH_CFLAGS} va_server_v1.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_common.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_common.c + ${CC} -c ${CRASH_CFLAGS} lkcd_common.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_v1.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v1.c + ${CC} -c ${CRASH_CFLAGS} lkcd_v1.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_v2_v3.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v2_v3.c + ${CC} -c ${CRASH_CFLAGS} lkcd_v2_v3.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_v5.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v5.c + ${CC} -c ${CRASH_CFLAGS} lkcd_v5.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_v7.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v7.c + ${CC} -c ${CRASH_CFLAGS} lkcd_v7.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_v8.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v8.c + ${CC} -c ${CRASH_CFLAGS} lkcd_v8.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +net.o: ${GENERIC_HFILES} net.c + ${CC} -c ${CRASH_CFLAGS} net.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +dev.o: ${GENERIC_HFILES} dev.c + ${CC} -c ${CRASH_CFLAGS} dev.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +# remote.c functionality has been deprecated +remote.o: ${GENERIC_HFILES} remote.c + @${CC} -c ${CRASH_CFLAGS} remote.c ${WARNING_OPTIONS} ${WARNING_ERROR} +remote_daemon.o: ${GENERIC_HFILES} remote.c + ${CC} -c ${CRASH_CFLAGS} -DDAEMON remote.c -o remote_daemon.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +x86.o: ${GENERIC_HFILES} ${REDHAT_HFILES} x86.c + ${CC} -c ${CRASH_CFLAGS} x86.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +alpha.o: ${GENERIC_HFILES} alpha.c + ${CC} -c ${CRASH_CFLAGS} alpha.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +ppc.o: ${GENERIC_HFILES} ppc.c + ${CC} -c ${CRASH_CFLAGS} ppc.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +ia64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} ia64.c + ${CC} -c ${CRASH_CFLAGS} ia64.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +ppc64.o: ${GENERIC_HFILES} ppc64.c + ${CC} -c ${CRASH_CFLAGS} ppc64.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +x86_64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} x86_64.c + ${CC} -c ${CRASH_CFLAGS} x86_64.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +arm.o: ${GENERIC_HFILES} ${REDHAT_HFILES} arm.c + ${CC} -c ${CRASH_CFLAGS} arm.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +arm64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} arm64.c + ${CC} -c ${CRASH_CFLAGS} arm64.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +s390.o: ${GENERIC_HFILES} ${IBM_HFILES} s390.c + ${CC} -c ${CRASH_CFLAGS} s390.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +s390x.o: ${GENERIC_HFILES} ${IBM_HFILES} s390x.c + ${CC} -c ${CRASH_CFLAGS} s390x.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +s390dbf.o: ${GENERIC_HFILES} ${IBM_HFILES} s390dbf.c + ${CC} -c ${CRASH_CFLAGS} s390dbf.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +s390_dump.o: ${GENERIC_HFILES} ${IBM_HFILES} s390_dump.c + ${CC} -c ${CRASH_CFLAGS} s390_dump.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +netdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} ${SADUMP_HFILES} netdump.c + ${CC} -c ${CRASH_CFLAGS} netdump.c ${WARNING_OPTIONS} ${WARNING_ERROR} +netdump_daemon.o: ${GENERIC_HFILES} ${REDHAT_HFILES} netdump.c + ${CC} -c ${CRASH_CFLAGS} -DDAEMON netdump.c -o netdump_daemon.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +diskdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} diskdump.c + ${CC} -c ${CRASH_CFLAGS} diskdump.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +makedumpfile.o: ${GENERIC_HFILES} ${REDHAT_HFILES} makedumpfile.c + ${CC} -c ${CRASH_CFLAGS} makedumpfile.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +xendump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} xendump.c + ${CC} -c ${CRASH_CFLAGS} xendump.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +kvmdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} kvmdump.c + ${CC} -c ${CRASH_CFLAGS} kvmdump.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +qemu.o: ${GENERIC_HFILES} ${REDHAT_HFILES} qemu.c + ${CC} -c ${CRASH_CFLAGS} qemu.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +qemu-load.o: ${GENERIC_HFILES} ${REDHAT_HFILES} qemu-load.c + ${CC} -c ${CRASH_CFLAGS} qemu-load.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +sadump.o: ${GENERIC_HFILES} ${SADUMP_HFILES} sadump.c + ${CC} -c ${CRASH_CFLAGS} sadump.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +ipcs.o: ${GENERIC_HFILES} ipcs.c + ${CC} -c ${CRASH_CFLAGS} ipcs.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +extensions.o: ${GENERIC_HFILES} extensions.c + ${CC} -c ${CRASH_CFLAGS} extensions.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_x86_trace.o: ${GENERIC_HFILES} ${LKCD_TRACE_HFILES} lkcd_x86_trace.c + ${CC} -c ${CRASH_CFLAGS} lkcd_x86_trace.c -DREDHAT ${WARNING_OPTIONS} ${WARNING_ERROR} + +unwind_x86_32_64.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind_x86_32_64.c + ${CC} -c ${CRASH_CFLAGS} unwind_x86_32_64.c -o unwind_x86_32_64.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +unwind_arm.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind_arm.c + ${CC} -c ${CRASH_CFLAGS} unwind_arm.c -o unwind_arm.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +unwind_v1.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind.c unwind_decoder.c + ${CC} -c ${CRASH_CFLAGS} unwind.c -DREDHAT -DUNWIND_V1 -o unwind_v1.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +unwind_v2.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind.c unwind_decoder.c + ${CC} -c ${CRASH_CFLAGS} unwind.c -DREDHAT -DUNWIND_V2 -o unwind_v2.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +unwind_v3.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind.c unwind_decoder.c + ${CC} -c ${CRASH_CFLAGS} unwind.c -DREDHAT -DUNWIND_V3 -o unwind_v3.o ${WARNING_OPTIONS} ${WARNING_ERROR} + +lkcd_fix_mem.o: ${GENERIC_HFILES} ${LKCD_HFILES} lkcd_fix_mem.c + ${CC} -c ${CRASH_CFLAGS} lkcd_fix_mem.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR} + +xen_hyper.o: ${GENERIC_HFILES} xen_hyper.c + ${CC} -c ${CRASH_CFLAGS} xen_hyper.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +xen_hyper_command.o: ${GENERIC_HFILES} xen_hyper_command.c + ${CC} -c ${CRASH_CFLAGS} xen_hyper_command.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +xen_hyper_global_data.o: ${GENERIC_HFILES} xen_hyper_global_data.c + ${CC} -c ${CRASH_CFLAGS} xen_hyper_global_data.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +xen_hyper_dump_tables.o: ${GENERIC_HFILES} xen_hyper_dump_tables.c + ${CC} -c ${CRASH_CFLAGS} xen_hyper_dump_tables.c ${WARNING_OPTIONS} ${WARNING_ERROR} + +${PROGRAM}: force + @make --no-print-directory all + +# Remote daemon functionality has been deprecated. +daemon_deprecated: force + @echo "WARNING: remote daemon functionality has been deprecated" + @echo + +${PROGRAM}d: daemon_deprecated make_configure + @./configure -d + @make --no-print-directory make_build_data + @make --no-print-directory daemon + +daemon: ${DAEMON_OBJECT_FILES} + ${CC} ${LDFLAGS} -o ${PROGRAM}d ${DAEMON_OBJECT_FILES} build_data.o -lz + +files: make_configure + @./configure -q -b + @make --no-print-directory show_files + +gdb_files: make_configure + @./configure -q -b + @echo ${GDB_FILES} ${GDB_PATCH_FILES} + +show_files: + @if [ -f ${PROGRAM} ]; then \ + ./${PROGRAM} --no_scroll --no_crashrc -h README > README; fi + @echo ${SOURCE_FILES} Makefile ${GDB_FILES} ${GDB_PATCH_FILES} ${GPL_FILES} README \ + .rh_rpm_package crash.8 ${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES} + +ctags: + ctags ${SOURCE_FILES} + +tar: make_configure + @./configure -q -b + @make --no-print-directory do_tar + +do_tar: + @if [ -f ${PROGRAM} ]; then \ + ./${PROGRAM} --no_scroll --no_crashrc -h README > README; fi + tar cvzf ${PROGRAM}.tar.gz ${TAR_FILES} ${GDB_FILES} ${GDB_PATCH_FILES} + @echo; ls -l ${PROGRAM}.tar.gz + +VERSION=7.0.3 +RELEASE=0 + +release: make_configure + @if [ "`id --user`" != "0" ]; then \ + echo "make release: must be super-user"; exit 1; fi + @./configure -P "RPMPKG=${RPMPKG}" -u -g + @make --no-print-directory release_configure + @echo + @echo "cvs tag this release if necessary" + +release_configure: make_configure + @if [ "${GDB}" = "" ] ; then \ + echo "make release: GDB not defined: append GDB=gdb-x.x to make command line"; echo; exit 1; fi + @./configure -r ${GDB} + @make --no-print-directory do_release + +do_release: + @echo "CRASH VERSION: ${VERSION} GDB VERSION: ${GDB}" + @if [ ! -f .rh_rpm_package ]; then \ + echo "no .rh_rpm_package exists!"; exit 1; fi + @chmod 666 .rh_rpm_package + @rm -rf ./RELDIR; mkdir ./RELDIR; mkdir ./RELDIR/${PROGRAM}-${VERSION} + @rm -f ${PROGRAM}-${VERSION}.tar.gz + @rm -f ${PROGRAM}-${VERSION}-${RELEASE}.src.rpm + @chown root ./RELDIR/${PROGRAM}-${VERSION} + @tar cf - ${SOURCE_FILES} Makefile ${GDB_FILES} ${GDB_PATCH_FILES} ${GPL_FILES} \ + .rh_rpm_package crash.8 ${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES} | \ + (cd ./RELDIR/${PROGRAM}-${VERSION}; tar xf -) + @cp ${GDB}.tar.gz ./RELDIR/${PROGRAM}-${VERSION} + @./${PROGRAM} --no_scroll --no_crashrc -h README > ./RELDIR/${PROGRAM}-${VERSION}/README + @(cd ./RELDIR; find . -exec chown root {} ";") + @(cd ./RELDIR; find . -exec chgrp root {} ";") + @(cd ./RELDIR; find . -exec touch {} ";") + @(cd ./RELDIR; \ + tar czvf ../${PROGRAM}-${VERSION}.tar.gz ${PROGRAM}-${VERSION}) + @chgrp root ${PROGRAM}-${VERSION}.tar.gz + @rm -rf ./RELDIR + @echo + @ls -l ${PROGRAM}-${VERSION}.tar.gz + @./configure -s -u > ${PROGRAM}.spec + @if [ -s ${PROGRAM}.spec ]; then \ + rm -rf ./RPMBUILD; \ + mkdir -p ./RPMBUILD/SOURCES ./RPMBUILD/SPECS ./RPMBUILD/SRPMS; \ + cp ${PROGRAM}-${VERSION}.tar.gz ./RPMBUILD/SOURCES; \ + cp ${PROGRAM}.spec ./RPMBUILD/SPECS; \ + rpmbuild --define "_sourcedir ./RPMBUILD/SOURCES" \ + --define "_srcrpmdir ./RPMBUILD/SRPMS" \ + --define "_specdir ./RPMBUILD/SPECS" \ + --nodeps -bs ./RPMBUILD/SPECS/${PROGRAM}.spec > /dev/null; \ + mv ./RPMBUILD/SRPMS/${PROGRAM}-${VERSION}-${RELEASE}.src.rpm . ; \ + rm -rf ./RPMBUILD; \ + ls -l ${PROGRAM}-${VERSION}-${RELEASE}.src.rpm; \ + fi + +ref: + make ctags cscope + +cscope: + rm -f cscope.files cscope_out + for FILE in ${SOURCE_FILES}; do \ + echo $$FILE >> cscope.files; done + cscope + +glink: make_configure + @./configure -q -b + rm -f gdb + ln -s ${GDB}/gdb gdb + (cd ${GDB}/gdb; rm -f ${PROGRAM}; ln -s ../../${PROGRAM} ${PROGRAM}) + +name: + @echo ${PROGRAM} + +dis: + objdump --disassemble --line-numbers ${PROGRAM} > ${PROGRAM}.dis + +extensions: make_configure + @./configure ${CONF_TARGET_FLAG} -q -b + @make --no-print-directory do_extensions + +do_extensions: + @(cd extensions; make -i TARGET=$(TARGET) TARGET_CFLAGS="$(TARGET_CFLAGS)" GDB=$(GDB) GDB_FLAGS=$(GDB_FLAGS)) + +memory_driver: make_configure + @(cd memory_driver; make --no-print-directory -i) --- crash-7.0.3.orig/debian/README.source +++ crash-7.0.3/debian/README.source @@ -0,0 +1,6 @@ +This package uses quilt to manage patches to the upstream source code. Patches +are stored in the source package as diffs in debian/patches and applied during +the build. For detailed information please refer to the Debian quilt +documentation: + +/usr/share/doc/quilt/README.source --- crash-7.0.3.orig/debian/changelog +++ crash-7.0.3/debian/changelog @@ -0,0 +1,3883 @@ +crash (7.0.3-3ubuntu4.1) trusty; urgency=medium + + * Linux-4.0.patch: Backport support for 4.0+ kernel versions. (LP: #1444528) + + -- Chris J Arges Wed, 22 Apr 2015 13:36:49 -0500 + +crash (7.0.3-3ubuntu4) trusty-proposed; urgency=medium + + * debian/patches/Updated-the-ARM64-implementation-to-support-Linux-3..patch: + Basic support >= 3.13 kernels on arm64. (LP: #1354349). + + -- dann frazier Tue, 30 Sep 2014 15:04:06 -0600 + +crash (7.0.3-3ubuntu3) trusty-proposed; urgency=medium + + * Build crash for ppc64el. LP: #1318809. + * Add ppc64el support (debian/control, debian/rules (for patches), + gdb-7.6-ppc64el.patch); patch-set provided by Bharata Rao. + + -- Mauricio Faria de Oliveira Fri, 16 May 2014 08:52:26 -0300 + +crash (7.0.3-3ubuntu2) trusty; urgency=low + + * debian/tests/live: Previous merge dropped the "allow-stderr" restriction. + Redirect gpg stderr to stdout, as that's the only known and expected + stderr source. + + -- Martin Pitt Thu, 21 Nov 2013 09:47:25 +0100 + +crash (7.0.3-3ubuntu1) trusty; urgency=low + + * Merge with Debian; remaining changes: + - Build for armhf, arm64. + * Minor fixes for live autopkgtest. + + -- Chris J Arges Mon, 18 Nov 2013 08:22:03 -0600 + +crash (7.0.3-3) unstable; urgency=low + + * Add autopkgtest and try to keep the Debian and Ubuntu crash packages in + sync (closes: #721095) + + -- Troy Heber Thu, 07 Nov 2013 08:14:34 -0700 + +crash (7.0.3-2) unstable; urgency=low + + * Fix from Louis Bouchard to resolve FTBS on + i386 + + -- Troy Heber Wed, 06 Nov 2013 09:41:06 -0700 + +crash (7.0.3-1) unstable; urgency=low + + * Fix for the ARM architecture if the backtrace unwind information cannot be + gathered during session initialization. Without the patch, the two + unwind-related warning messages indicating "WARNING: UNWIND: failed to + gather unwind_table list" and "WARNING: UNWIND: failed to initialize + module unwind tables" are followed by the fatal error message "crash: + cannot hash task_struct entries". + + * Fix for the "help -[Dn]" dumpfile information display of the GUID EFI + table in the header of SADUMP dumpfiles. Without the patch, only 33 of + the 36 bytes in the table are translated. + + * Fix for the determination of the kernel NR_CPUS configurable for Linux 3.8 + and later kernels that are configured with CONFIG_SLAB. Without the + patch, the kernel's compiled-in NR_CPUS value was incorrectly calculated + to be the sum of the kernel's NR_CPUS and MAX_NUMNODES configurables. + + * In the next release of makedumpfile, the status field of the dumpfile + header of compressed kdumps will show the compression type that was + utilized. The "help -[Dn]" output has been updated to display that + information. + + * For kernels configured with CONFIG_SLAB in which an array_cache pointer + referenced by a kmem_cache structure is invalid, the individual cache(s) + will be marked as invalid. During session initialization, the message + "crash: kmem_cache: : invalid array_cache pointer" will be + displayed, and during runtime, attempts to access the cache(s) will result + in a message indicating that the cache is "[INVALID/CORRPUTED]". Without + the patch, the message "crash: unable to initialize kmem slab cache + subsystem" is displayed during session initialization, and run-time + commands that attempt to access the kmem slab cache subsystem fail with + the error message "kmem cache slab subsystem not available". + + * Fix for the "kmem -[sS] " option in Linux 3.6 and + later kernels configured with CONFIG_SLAB. Without the patch, the command + fails with the message "kmem: address is not allocated in slab subsystem: + . This also causes the "kmem " + command to (quietly) fail to determine that the address is a slab object. + + * Fix for the "bt" command if a kernel __init text address is encountered. + Without the patch, and depending upon the reallocation of the __init text + memory, a bogus framesize may be calculated, or more likely, in a + compressed kdump, a warning message indicating "bt: page excluded: kernel + virtual address:
type: gdb_readmem_callback" will be displayed + following the frame data. + + * Update for determining whether an S390X PTE contains a swap entry in Linux + 3.12 and later kernels. + + * Resurrected the translation and display of the page.flags bits by the + "kmem -p" command on Linux 2.6.26 and later kernels whose vmlinux + debuginfo data contains either the "pageflags" enumerator or the + "pageflag_names" array of trace_print_flags structures. If they are not + available, just the page.flags value is printed in hexadecimal, as has + been done since Linux 2.4.9. + + * Fix for the "bt" command when used with vmcore files that were created + with the recently-introduced "virsh dump --memory-only", which dumps KVM + guests into an ELF vmcore similar to those created by the kdump facility. + Without the patch, a faulty backtrace for the panic task may be generated + due to the use of incorrect starting RSP/RIP registers; this happens + because (unlike kdump) the non-panicking cpus are offlined prior to the + dumpfile being created, which in turn leads to the use of the wrong + NT_PRSTATUS note. + + * Fix for the CPU number display on systems with 255 or more cpus during the + initial banner, by the "set" command, the "ps" command, and by all + commands that display the per-task header consisting of the task address, + pid, cpu and command name. Without the patch, for cpu 255, the "sys" + command displays "NO_PROC_ID", and the other commands would show a "-" for + the cpu number; for cpu numbers greater than 255, garbage values would be + displayed in the cpu number field. + + * Implemented support for compressed kdump header version 6, in which + makedumpfile(8) adds new fields in the kdump_sub_header to support large + memory systems with pfn values that are larger than 32-bits. Without the + patch, if the system contains physical memory located in high memory such + that its maximum pfn value is overflows the 32-bit "max_mapnr" field in + the header, the crash session will fail with the error message "crash: + vmlinux and vmcore do not match!". + + * Fix for the "net -s" command on Linux 3.8 and later kernels. Without the + patch, the command fails with the message "net: invalid structure member + offset: inet_opt_daddr". + + * Fix a build failure in a native ARM64 environment due to obsolete LKCD + dumpfile headers. + + * Implementation of a new "per-cpu object" as an argument format that can be + passed to the "p", "struct", "union" or "*" commands. The format is + expressed as either : or as :, where the per-cpu symbol or per-cpu offset must + precede a colon, and where the follows the colon. + Without the patch, per-cpu symbols are only accepted by the "p" command, + and the data type and the resolved kernel virtual address for each per-cpu + instance are displayed shown. With this patch, a colon and a + cpu-specifier may be appended to the symbol name, and the the contents of + the symbol on each cpu that is specified will be displayed by the "p" + command. For the "struct/union/*" commands, an argument may be specified + using either a per-cpu offset value or per-cpu symbol name followed by a + colon and cpu-specifier, and the contents of each structure/union on each + specified cpu will be displayed. + + Fixed several minor flaws that were detected by a Coverity Scan. + + -- Troy Heber Wed, 30 Oct 2013 16:12:40 -0600 + +crash (7.0.2-1ubuntu1) trusty; urgency=low + + * Merge with Debian; remaining changes: + - Build for armhf. + - Add a live autopkgtest to run crash on running kernel. + * Build for AArch64. + + -- Matthias Klose Sat, 19 Oct 2013 16:54:49 +0200 + +crash (7.0.2-1) unstable; urgency=low + + * Added "bison" to the BuildRequires line of the crash.spec file. + Without the patch, the build of the embedded gdb-7.6 module will fail + unless either /usr/bin/bison or /usr/bin/yacc are available. The + failure will result in a stream of error messages from different + files that indicate: + + multiple definition of 'main' + undefined reference to 'c_parse_escape' + undefined reference to 'ada_parse' + undefined reference to 'ada_error' + undefined reference to 'c_parse' + undefined reference to 'c_error' + undefined reference to 'cp_demangled_name_to_comp' + undefined reference to 'cp_demangled_name_parse_free' + undefined reference to 'cp_comp_to_string' + undefined reference to 'cp_new_demangle_parse_info' + + and the build fails like so: + + collect2: ld returned 1 exit status + make[4]: *** [gdb] Error 1 + crash build failed + + If building with rpmbuild, the new BuildRequires "bison" entry will + prevent the build from initiating unless the bison package has been + installed. If building with the tar.gz file, the build attempt will + proceed and fail unless either the bison or byacc (Berkeley Yacc) + package is installed. + + * Fix the S390X initialization sequence on kernels that are configured + with CONFIG_STRICT_DEVMEM to automatically try /proc/kcore if: + + (1) the /dev/crash driver is not available, and + (2) the initial /dev/mem access fails. + + Without the patch, if /dev/mem is selected as the memory source and + it is restricted, the crash session will fail during initialization + with the error message "crash: read error: kernel virtual address: +
type: cpu_possible_mask". + + * When checking whether a argument on the crash command line is a dumpfile + that may be in makedumpfile's "flattened" format, do not bother checking + character device files. + + * Fix for the PPC64 virtual-to-physical virtual address translation + mechanism for vmalloc and user-space virtual addresses on Linux 3.10 and + later kernels. Without the patch, the message "WARNING: cannot access + vmalloc'd module memory" is displayed during initialization, and during + the crash session, if a command attempts to translate or read a vmalloc or + user-space virtual address, it will fail. + + * Clean up all files that emit "warning: format not a string literal and no + format arguments" when compiled with -Wformat-security warning option. + All instances of fprintf, sprintf and snprintf using the format + "fprintf(fp, buf)" are replaced with "fprintf(fp, "%s", buf)". Also, the + -Wformat-security warning option has been added to the option list used + when compiling with "make warn". + + * Fix a build failure when compiling with very old gcc-3.4.6 version on a + 2.6.9-based RHEL4 IA64 host. The bfd library in gdb-7.6 is compiled with + the -Werror option, and it fails with the message "elflink.c:4733: + warning: 'idx' might be used uninitialized in this function". + + * Fix a build failure when compiling with very old gcc-3.4.6 version on a + 2.6.9-based RHEL4 S390 or S390X hosts. The embedded gdb-7.6 fails to + compile with the error message "s390-nat.c:364: error: storage size of + 'iov' isn't known". + + * Fix to properly store two-digit kernel version numbers. (closes: #717036) + + * Fix to provide hugepage address translation for the "vtop" command on the + PPC64 architecture. + + * Fix for the "log" command to account for the kernel data structure name + change from "log" to "printk_log" in Linux 3.11-rc4 and later kernels. + Without the patch, the message "WARNING: log buf data structure(s) have + changed" will be displayed during initialization and by the "log" command. + + * Fix to add a linefeed after the description of the "kmem -I" option in the + "help kmem" output, which was recently added in crash-7.0.0. + + * Document the "-s" command line option in the "crash -h|--help" output and + in the crash.8 man page to also indicate that runtime command scrolling is + turned off by default. + + * Fix for the "irq -d" option on 2.6.25 and later X86_64 kernels to display + the Intel interrupt descriptor table contents. Without the patch, those + kernel versions would display "irq: -d option not supported or applicable + on this architecture or kernel". + + * Fix for the "kmem -[sS]" options on Linux 3.11-rc1 and later kernels that + are configured with CONFIG_SLAB. Without the patch, the command fails + with the error message "kmem: invalid structure member offset: + + * Fix for the "kmem
" and the "bt -F" options on Linux 3.8 and + later kernels that are configured with CONFIG_SLUB. Without the patch, + the command would fail with the error message "kmem: invalid structure + member offset: page_slab". + + * Fix misspellings in the "bt" and "search" help page output. + + * Fix for the determination of the base of the kernel's unity-mapped virtual + address region on recent ARM kernels whose "_stext" variable address has + changed from 0xc0008000 to 0xc0100000. Without the patch, the crash + session fails during invocation with the error message "crash: vmlinux and + vmcore do not match!". + + * When printing data structures, prevent the embedded gdb from symbolically + translating pointers that are not kernel virtual addresses. Kernel or + module symbols that are not virtual addresses can be mistaken for virtual + addresses, leading to NULL pointers being invalidly translated into a + symbol name from the vmlinux or module object file. For example, in + X86_64 kernels, NULL pointers are translated into the symbol + "irq_stack_union", whose value is not a virtual address, but rather a + per-cpu offset value of 0. + + * Fix for the "kmem -s
" or "kmem
" options on Linux 3.11 + and later kernels configured with CONFIG_SLAB. Without the patch, both + commands fail with the error message "kmem: cannot resolve cache_cache". + + * Fix to prevent the "bt" command from generating a segmentation violation + in a case where the per-cpu "current_task" variable and the runqueue's + "curr" variable did not agree, and the panic task had overflowed its + kernel stack. This led to the selection of the a starting RSP address + which belonged to the other task; without the patch, the command generated + a segmentation violation after printing the first frame of the backtrace. + + -- Troy Heber Wed, 16 Oct 2013 10:26:33 -0600 + +crash (7.0.1-3) unstable; urgency=low + + * Updated format-strings patch to cover additional architectures + * Requested update to packages-arch-specific to enable s390x and armel + (#717283) + + -- Troy Heber Tue, 16 Jul 2013 07:00:41 -0600 + +crash (7.0.1-2) unstable; urgency=low + + * Missed updating the Architecture line in the -1 upload, armel + (closes: #656132) + * Move defs.h to /usr/include/crash (closes: #702513) + * Patch from Stefan Bader to add a format string to all *printf calls + + -- Troy Heber Thu, 11 Jul 2013 08:51:32 -0600 + +crash (7.0.1-1) unstable; urgency=low + + * Enable armel (closes: #656132) + * Enable s390x (closes: #710675) + * Include the crash/defs.h header (closes: #702513) + * Sync with the Ubuntu crash package, build crash extensions, SPU has been + dropped (closes: #584119), lpia has been dropped (closes: #504522). + * Fix the -I include path sequence in the extensions/eppic.mk file to + prevent a series of "redefined" and "redeclaration" warnings when + compiling the EPPIC extension module. + * Address two compile-time warnings generated as a result of the + gdb*7.6.patch. Without the patch, there are "warning: no previous + prototype" warnings for gdb_main_entry() and replace_ui_file_FILE(). + * Implemented a new "mod -t" option that walks through the installed modules + and checks for non*zero values in each module's "taints" bitmask, and + translates the bits into symbolic letters if possible, or shows the + hexadecimal value of the bitmask if not. In older kernels, the + "license_gplok" field is checked, and if non*zero, its value is displayed + in hexadecimal. Lastly, if the "gpgsig_ok" member exists and is zero, a + "(U)" notation will also be displayed. + * Fixed compiler warnings generated by extensions/trace.c when compiled + with *DFORTIFY_SOURCE=2. Without the patch, the messages "warning: + ignoring return value of 'mktemp', declared with attribute + warn_unused_result", "warning: ignoring return value of 'fwrite', + declared with attribute warn_unused_result", and "warning: 'trace_dat' + may be used uninitialized in this function" are generated. + * Laid down the basic infrastructure for the ARM64 backtrace facility using + the kernel's arm64 unwind facility as a basis. Compile*tested only. + * Implemented the ARM64 virtual-to-physical kernel and user address + translation functions, supporting both 2*level page tables with 64K pages, + and 3*level page tables with 4K pages. Also added the associated PTE + translator function. Compile*tested only. + * Implemented the capability of building crash as an x86_64 binary for + analyzing ARM64 dumpfiles on an x86_64 host, which can be done by entering + "make target=ARM64". After the initial build is complete, subsequent + builds can be done by entering "make" alone. + * Added "aarch64" to the ExclusiveArch: line in the crash.spec file. + * Fix for the S390X "bt" command for Linux 3.10 and later kernels. Without + the patch, the starting stack location of the per*cpu async and panic + stacks of active tasks would be incorrectly determined. + + -- Troy Heber Tue, 18 Jun 2013 13:38:49 -0600 + +crash (7.0.0-1) unstable; urgency=low + + * Updated the embedded gdb version to FSF gdb-7.6, which was officially + released by the Free Software Foundation on http://www.gnu.org on 4/26/13. + The primary motivation for upgrading from gdb-7.3.1 is for future ARM64 + support, but there are also issues with respect to kernels built with + gcc-4.8.0. The relevant pieces of gdb-7.3.1.patch were forward-ported to + the gdb-7.6.patch, and the GDB_7_6 #define has been applied in the + top-level sources where appropriate. + + * Continued incremental steps for support of the ARM64 architecture. + + * Fix for the "struct name.member
" option if the "member" name is + also coincidentally a member of an embedded structure that is located + before the targeted member. Without the patch, the value of the embedded + structure's member is displayed instead of the targeted member. + + * Expose a heretofore unadvertised "kmem -[sS] -I slab[,slab]" option that + specifies one or more slab cache names in a comma-separated list that the + "kmem -[sS]" option should ignore. This can be helpful in cases where a + corrupted slab cache may never complete, or in very large memory systems + where one or more caches take an inordinate amount of time to complete. + + * Fix for the "kmem -i" option on Linux 3.9 and later kernels. Without the + patch, the "TOTAL SWAP", "SWAP USED" and "SWAP FREE" lines are not + displayed because the kernel's former "swapper_space" singular + address_space structure has has been changed into a "swapper_spaces" array + of address_space structures, with one for each swap partition. + + * Support for the PPC64 BOOK3E processor family, whose virtual memory + layout and PTE format are significantly different. Without the patch, the + crash session fails to initialize properly. (ataufer@us.ibm.com) + + * Fix for the PPC64 "sys", "mach" and initial system banner display of of + the processor speed in more recent kernels. Without the patch, the + "MACHINE" line in the initial banner and in the "sys" command display may + show "MACHINE: ppc64 (unknown Mhz)", and the "mach" command may show + "PROCESSOR SPEED: (unknown)". (anderson@redhat.com, ataufer@us.ibm.com) + + * Since the libgdb.a file no longer exists in gdb-7.6, the Makefile does not + check for it as a determining factor for whether a build has succeeded. + + * gdb-7.6 requires that the bfd library's "config.h" file be #include'd + before the "bfd.h" file by the top-level symbols.c file. + + * gdb-7.6 has replaced/moved the gnu_debuglink_crc32() utility function to + bfd_calc_gnu_debuglink_crc32(); the call in symbols.c has been configured + based upon the gdb version. + + * gdb-7.6 has reworked its do_cleanups() functionality, which requires the + gdb_error_hook() function to pass all_cleanups() as an argument. + + * gdb-7.6 causes the anon_member_offset() function to fail due to a change + in the output string; the function has been changed to work with both old + and new gdb versions. + + * gdb-7.6 required changes to vm_stat_init() and vm_event_state_init() + functions because enum lists get displayed differently on the S390X and + PPC64 architectures, which in turn caused failures of "kmem -i", "kmem -z" + and "kmem -V" on those two machine types. + + * Adjusted the alignment of the "kmem -V" and "kmem -z" display of the items + in the vm_stat[] array based upon the longest enumerator name string. + + * Adjusted the alignment of the "kmem -V" display of the cumulative totals + of the per-cpu "vm_event_states" items based upon the longest enumerator + name string. + + * Modified the top-level Makefile such that if the tar.gz file of the + configured gdb version does not exist in the build directory, try to wget + the file from http://ftp.gnu.org/gnu/gdb. This is normally not necessary + because the most recent gdb tar.gz file is bundled with the the crash + utility tar.gz and src.rpm files. However, it will allow the use of the + gdb-less crash.tar.gz file created via "make tar" to be copied to another + location, or perhaps copied to a git tree, and then built without + containing the the gdb tar.gz file. + + * Fix for the s390x.c file to handle a gcc-4.8.0 compiler warning when + building crash with "make warn", or compiler failures when building with + "make Warn" on an S390x machine. Without the patch, gcc-4.8.0 generates + the message "error: variable ‘psw_addr’ set but not used + [-Werror=unused-but-set-variable]". + + * Fixes for the s390dbf.c file to handle gcc-4.8.0 compiler warnings when + building crash with "make warn", or compiler failures when building with + "make Warn" on an S390X machine. Without the patch, gcc-4.8.0 generates + three "error: variable ‘’ set but not used + [-Werror=unused-but-set-variable]" messages. + + * Fix for an X86_64 warning message that gets displayed during session + initialization when running against Linux 3.9 kernels that were compiled + with gcc-4.8.0. Without the patch, the warning message "crash: cannot + determine thread return address" is displayed prior to the system + information. + + * Fix for lack of kernel text line number information by the "dis -l" and + "sym " options on Linux 3.9 kernels that were + compiled with gcc-4.8.0. Without the patch, the line number information + for kernel text symbols of type "(T)" may not be able to be determined and + displayed. + + -- Troy Heber Mon, 13 May 2013 11:59:26 -0600 + +crash (6.1.6-1ubuntu2) saucy; urgency=low + + * Add a live autopkgtest to run crash on running kernel. + + -- Chris J Arges Tue, 27 Aug 2013 12:37:03 -0500 + +crash (6.1.6-1ubuntu1) saucy; urgency=low + + * Merge from Debian unstable. Remaining changes: + - debian/rules: Always build extensions and package them. + - debian/rules: Cleanup for extensions. + * Dropped ubuntu changes: + - SPU extension support. + * debian/control: Add armhf to build architectures. + + -- Stefan Bader Thu, 09 May 2013 16:47:06 +0200 + +crash (6.1.6-1) unstable; urgency=low + + * New upstream version 6.1.6 + + * Fix for a crash-6.1.5 regression that causes the "mount" command to fail + on kernel versions prior to Linux 3.3. Without the patch, the command + fails with the message "mount: invalid structure member offset: + mount_mnt_devname". + + -- Troy Heber Mon, 06 May 2013 11:20:38 -0600 + +crash (6.1.5-1) UNRELEASED; urgency=low + + * New upstream version 6.1.6 + + * Fix for the ARM "irq" command. Without the patch, on 2.6.34 and later + kernels configured with CONFIG_SPARSE_IRQ, the command fails with the + error message "irq: cannot determine number of IRQs". + + * Fix for a segmentation violation generated during invocation while parsing + a makedumpfile-created "flat-format" vmcore-incomplete file. Without the + patch, the crash session would display the error message "crash: unable to + seek dump file vmcore-incomplete", followed by a segmentation violation. + + * Fix for a segmentation violation generated by the "kmem -s" option when + encountering a corrupted array_cache structure that contains a bogus + "avail" count that is greater than the maximum legitimate limit value. + Without the patch, the "kmem -s" command would print a warning message + regarding the invalid array_cache, complete the command normally, and then + generate a segmentation violation when freeing buffers used by the + command. + + * Update to the "kmem -s" function to include the errors found in slab + structures to the display of total errors found when the command + completes. Without the patch, invalid list_head pointers, bad inuse + counters, and bad s_mem pointers were not added to the total number of + errors found. + + * Fix for "crash --osrelease " and "crash --log " when + run on an ARM compressed kdump with a crash binary that was built with + "make target=ARM" on an x86 or x86_64 host. Without the patch, if the + compressed kdump header version is 4 or 5, "crash --osrelease" fails with + the error message "crash: compressed kdump: cannot lseek dump vmcoreinfo" + followed by "unknown", and "crash --log" fails with the error message + "crash: : no VMCOREINFO section". + + * Enhancement to the "swap" command to display the swap_info_struct address + of each configured swap device. The output has been changed to display + the address in the first column, and the variable-length device name has + been moved to the last column. + + * Fix for the "kmem -[sS]" options on kernels that configured with both + CONFIG_SLUB and CONFIG_NODES_SHIFT, and that are running on hardware that + generates NUMA nodes that contain no memory. Without the patch, both + command options fail immediately with the message "kmem: invalid kernel + virtual address: 8 type: kmem_cache_node nr_partial". + + * Increment the PPC64 NR_CPUS maximum value from 1024 to 2048. + + * Strip the ".isra." and ".part." appendages to cloned text symbol names, + which seem to have been introduced by gcc-4.6.0. To keep them intact, a + "--no_strip" command line option has been added. + + * Patch to the internal gdb_get_datatype() function to return the typecode + and length of integer variables. + + * Fix for the "dev -d" option on Linux 3.6 and later kernels. Without the + patch the option fails with the message "dev: invalid structure member + offset: request_queue_rq". + + * Export the red/black tree utility functions rb_first(), rb_parent(), + rb_right(), rb_left(), rp_next() and rb_last(). Without the patch, they + are statically declared and only used by the "runq" command. + + * Implemented a new "timer -r" option that displays the hrtimer queues, + supporting all versions from Linux 2.6.16 to the present. + + * Fix for "kmem -s" on Linux 3.8 and later kernels that are configured with + CONFIG_SLAB. The kmem_cache.array[] length has been extended to store the + nodelist pointers, so the original method to determine the per-cpu array + limit can go out-of-range. Without the patch, during session + initialization there may be a message that indicates "crash: invalid + kernel virtual address:
type: array cache limit", followed by + "crash: unable to initialize kmem slab cache subsystem"; if those messages + do get shown, then "kmem -s" will subsequently fail during runtime with + the message "kmem: kmem cache slab subsystem not available". + + * Two Xen hypervisor fixes: (1) Fix console buffer content length + calculation: Function displaying console buffer always assumes its content + length equal to console buffer size. This is not true and sometimes it + sends garbage to the screen. This patch fixes this issue. (2) Improve + calculation of beginning of virtual address space: Xen changeset 26447 + (x86: re-introduce map_domain_page() et al) once again altered virtual + address space. The current algorithm calculating its start could not cope + with that change. New version establishes this value on the base of image + start address and is more generic. + + * Fix for the ARM "vtop" command when run on a module address. Without the + patch, the command fails with error message "vtop: ambiguous address: + (requires -u or -k)". + + * Add the "--active" command line option to the crash(8) man page and to the + "crash [-h|--help]" output. + + * Add the "--buildinfo" command line option to the crash(8) man page and to + the "crash [-h|--help]" output. + + * Remove the unadvertised and unnecessary "--data_debug" command line + option, given that it is the default setting. + + * Remove the unadvertised and obsolete "--no_namelist_gzip" command line + option. + + * Add the "-g [namelist]" command line option to the crash(8) man page and + to the "crash [-h|--help]" output. + + * Remove the unadvertised and never-implemented "--shadow_page_tables" + command line option. + + * Fix for the ARM "vtop" command when run on a user virtual address of the + panic task. Prior to Linux 3.3, the panic task's pgd gets overwritten + with a pgd that identity-maps the whole address space, and therefore crash + loses the capability of translating any user virtual address into its + original physical address. + + * Fix to prevent the ARM linker mapping symbols "$d" and "$a" from being + added to the list of symbols from kernel modules. Without the patch, the + two symbols would only be rejected from the base kernel's symbol list, but + would be added to the symbol list of individual kernel modules. + + * Fix for the X86_64 "bt" command to recognize that the kernel was built + with CONFIG_FRAME_POINTER on Linux 3.7 and later kernels that are + configured with CONFIG_FUNCTION_TRACER. In those kernels, the special + 4-byte NOP instruction that can be overwritten during runtime for dynamic + ftracing has been moved to the very beginning of each function, before the + function preamble. Without the patch, the test that checks the function + preamble to determine whether CONFIG_FRAME_POINTER was configured would + fail, which could potentially lead to less reliable backtraces. + + -- Troy Heber Mon, 06 May 2013 11:20:38 -0600 + +crash (6.1.4-1) UNRELEASED; urgency=low + + * New upstream version 6.1.4 + + * Fix for a crash-6.1.3 regression with respect to the loading of extension + modules. Because of the change that replaced the obsolete _init() and + _fini() functions with constructor and destructor functions, extension + modules may fail to load when the extension modules are built with older + compiler/linkers. The problem is due to the continued usage of the + -nostartfiles compiler option regardless whether the extension module has + replaced its _init() function with a constructor function; with older + compiler/linkers, the module may fail to load. The fix predetermines + whether an extension module still uses _init() or if it has been updated + to use a constructor function, and will use the -nostartfiles option only + on older "legacy" modules. + + * Implemented a new "list -r" option that can be used with lists that are + linked with list_head structures. When invoked, the command will traverse + the linked list in the reverse order by using the "prev" pointer instead + of "next". + + * Fix for the "swap" command's FILENAME display. In some kernels between + 2.6.32 and 2.6.38 the swap partition's pathname may not show the "/dev" + filename component. + + * Fix for the "swap" command's PCT display, which will display a a negative + percentage value if more than 5368709 swap pages are in use. + + -- Troy Heber Mon, 06 May 2013 11:20:38 -0600 + +crash (6.1.3-1) unstable; urgency=low + + * New upstream version 6.1.3 + + * Implemented a new "crash --log dumpfile" option which dumps the + kernel log buffer and exits. A kernel namelist is not required, + but the dumpfile must contain the VMCOREINFO data from the ELF + header of the original /proc/vmcore file that was created by the + kexec/kdump facility. Accordingly, this option supports kdump ELF + vmcores and compressed kdump vmcores created by the makedumpfile + facility, including those that are in makedumpfile's intermediary + "vmcore.flat" format. + + * Fixes for the ppc64.c file to handle gcc-4.7.2 compiler warnings when + building crash with "make warn", or compiler failures when building + with "make Warn" on a PPC64 machine. Without the patch, gcc-4.7.2 + generates three "error: variable ‘’ set but not used + [-Werror=unused-but-set-variable]" messages. + + * Update the PPC64 architecure's internal storage of the kernel's + MAX_PHYSMEM_BITS value for Linux 3.7 and later kernels, which changed + from 44 to 46 to for 64TB support. Without the patch, there is no + known issue, but the stored value should be correct. + + * Fix for the "mount" command's header display to indicate "MOUNT" + instead of "VFSMOUNT" on Linux 3.3 and later kernels because the + the first column contains a mount structure address instead of a + vfsmount structure address. For those later kernels, it is + permissable to enter either the mount structure address, or the + address of the vfsmount structure that is embedded within it, as + an optional argument. The output has also been tightened up so + that the DIRNAME field is not shifted to the right based upon the + DEVNAME field length. + + * Fix for the "mount " search option on 2.6.32 and later + kernels. Without the patch, it is possible that multiple filesystems + will be displayed. + + * Update to the "mount" help page to indicate that a dentry address + may be used as a search option. + + * Fix for the "ps -l [pid|task|command]" option to display the + specified tasks sorted with the most recently-run task (the largest + last_run/timestamp) shown first, as is done with the "ps -l" option + with no arguments. Without the patch, the timestamp data gets + displayed in the order of the "[pid|task|command]" arguments. + + * Added the "ps" command to the set of supported "foreach" commands, + serving as an alternative manner of passing task-identifying + arguments to the "ps" command. For example, a command such as + "foreach RU ps" can be accomplished without having to pipe normal + "ps" output to "grep RU". All "ps" options are supported from the + "foreach" framework. + + * Fix for the "ps -G" restrictor option such that it also takes affect + if the -p, -c, -l, -a, -r or -g options are used. Without the + patch, thread group filtering would only take effect when the default + "ps" command is used without any of the options above. + + * Fortify the internal hq_open() function to return FALSE if it is + already open, and have restore_sanity() and restore_ifile_sanity() + call hq_close() unconditionally. + + * Added the "extend" command to the set of built-in commands that + support minimal mode. A new MINIMAL flag has been created for + extension modules to set in their command_table_entry.flags field(s) + to signal that a command supports minimal mode. If the crash session + has been invoked with --minimal, then the "extend" command will + require that the module registers at least one command that has + the MINIMAL bit set. + + * Prevent the "__crc_*" symbols from being added to the the ARM kernel + symbol list. + + * Prevent the "PRRR" and "NMRR" absolute symbols from being added to + the ARM kernel symbol list. Without the patch, it allows an invalid + set of addresses to pass the check in the in_ksymbol_range() function. + + * Fix for the ppc.c file to handle a gcc-4.7.2 compiler warning when + building crash with "make warn", or compiler failures when building + with "make Warn" on a PPC machine. Without the patch, gcc-4.7.2 + generates the message "error: variable ‘dm’ set but not used + [-Werror=unused-but-set-variable]". + + * Workaround for the "crash --osrelease dumpfile" option to be able + to work with malformed ARM compressed kdump headers. ARM compressed + kdumps that indicate header version 3 may contain a malformed + kdump_sub_header structure with offset_vmcoreinfo and size_vmcoreinfo + fields offset by 4 bytes, and the actual vmcoreinfo data is not + preceded by its ELF note header and its "VMCOREINFO" string. This + workaround finds the vmcoreinfo data and patches the stored header's + offset_vmcoreinfo and size_vmcoreinfo values. Without the patch, the + "--osrelease dumpfile" command line option fails with the message + "crash: compressed kdump: cannot lseek dump vmcoreinfo", followed by + "unknown". + + * Fix for the "help -n" option on 32-bit compressed kdumps. Without + the patch, the offset_vmcoreinfo, offset_eraseinfo, and offset_note + fields of the kdump_sub_header have their upper 32-bits clipped off + when displayed. However, it should be harmless since the offset + values point into the first few pages of the dumpfile. + + * Update of the extensions/echo.c extension module example, and the + "extend" help page, to utilize a constructor function to call the + register_extension() function. The _init() and _fini() functions + have been designated as obsolete for usage by dlopen() and dlclose(). + The echo.c example module has been modified to contain echo_init() + and echo_fini() functions marked as __attribute__((constructor)) and + __attribute__((destructor)) respectively. + + * Updated extensions/dminfo.c, extensions/snap.c and extensions/trace.c + to replace their _init() and _fini() functions with constructor and + destructor functions. + + * Fix for the "bt" command on the PPC64 architecture when running + on Linux 3.7 kernel threads. Without the patch, some kernel threads + may fail to terminate on the final ".ret_from_kernel_thread" frame, + repeating that frame endlessly, because the stack linkage pointer + points back to itself instead of being NULL. + + -- Troy Heber Wed, 13 Feb 2013 09:28:40 -0700 + +crash (6.1.2-1) UNRELEASED; urgency=low + + * New upstream version 6.1.2 + + * Enhancement of the "task" command to display both the task_struct and the + thread_info structures of a task. The -R option accepts members of + either/both structure types. + + * Fix for the X86_64 "search" and "rd" commands due to this commit: + http://git.kernel.org/linus/027ef6c87853b0a9df53175063028edb4950d476 Upon + any attempt to read a page within the RAM region reserved for AMD GART on + a live system, the Linux 3.7rc1 commit above causes causes /dev/mem, + /proc/kcore and the /dev/crash drivers to spin forever, leading to a + kernel soft lockup. The RAM pages reserved for GART consist of 2MB large + pages whose _PAGE_PRESENT bits are turned off. Prior to the above commit, + a read() attempt on GART RAM would cause an unresolvable page fault, and + would harmlessly return an EFAULT. The commit above has changed + pmd_large() function such that it now returns TRUE if only _PAGE_PSE bit + is set in the PTE, whereas before it required both _PAGE_PSE and + _PAGE_PRESENT. So instead of just failing the read() system call with an + EFAULT, the page fault handling code now considers it a spurious TLB + fault, and the instruction is retried indefinitely. The crash utility + patch stores the GART physical memory range, and disallows any attempts to + read from it. + + * If an EPPIC_GIT_URL environment variable is defined, then the URL that it + points to is used as an alternative to the code.google.com git source + repository for the eppic.so extension module. However, the alternative + site is only accessed if code.google.com can first be pinged; this patch + removes that restriction. + + * Fix for the "files" command PATH display on kernels configured with + CONFIG_DEVTMPFS, when the vfsmount pointer in an file structure's "f_path" + member does not point to the root vfsmount required for reconstructing the + full file pathname. Without the patch, open files in /dev directory may + be truncated and not show the "/dev" filename component. + + * Enhancement to the "kmem -v" option on 2.6.28 and later kernels that + utilize the "vmap_area_list" list of mapped kernel virtual memory regions, + replacing the usage of the to-be-obsoleted "vmlist" list. In those + kernels, the output of the command will also show each vmap_area structure + address, in addition to its vm_struct address, memory range, and size. + + * Update to the exported do_rbtree() and do_rdtree() functions such that + they will return the number of items found in the targeted tree, similar + in nature to the do_list() function. The two functions have also been + fixed such that the VERBOSE flag is actually recognized, so that external + callers are able to gather the entries in a tree without having them + displayed. The calls to either function may be enclosed with hq_open() + and hq_close() so the that tree entries may be subsequently gathered by + retrieve_list() into a supplied buffer, as well as to recognize a + corrupted list with duplicate entries. + + * Fix for the "extend -u" option to prevent the usage of a member of a + free()'d extension_table structure. No command failure occurs, but rather + an inadvertent coding error. + + * Fix to allow error() to be called during an open_tmpfile() sequence prior + to close_tmpfile() being called. There are no crash functions that call + error() during an open_tmpfile() sequence, but there's no reason why it + cannot be done. Without the patch, the error message gets displayed on + stdout (as expected), but the error message will also overwrite/corrupt + the tmpfile() data while it is being parsed. + + * Fix to properly determine whether X86_64 kernels were configured with + CONFIG_FRAME_POINTER, due to this ftrace-related commit: + http://git.kernel.org/linus/d57c5d51a30152f3175d2344cb6395f08bf8ee0c + Without the patch, the crash utility fails to determine whether the kernel + was built with CONFIG_FRAME_POINTER, and therefore the "bt" command cannot + take advantage of it for more reliable backtraces. + + * Fix to properly determine whether 2.6.31 and earlier X86_64 kernels were + configured with CONFIG_FRAME_POINTER. Without the patch, the crash + utility may fail to determine whether the kernel was built with + CONFIG_FRAME_POINTER. In those kernel versions -- which may be dependent + upon the compiler version used -- one of the sample functions tested may + have their "push %rbp, mov %rsp,%rbp" function preamble separated by other + instruction(s), resulting in a false negative that precludes the "bt" + command from taking advantage of framepointers. + + * Fix for the file and line-number string that is displayed by the "sym + " option. Without the patch, the "/usr/src/" part of the + string is stripped, and the filename string itself could have two + corrupted characters in the pathname, for example, showing + "k3.nel-3.6.fc17" instead of "kernel-3.6.fc17". This is dependent upon + the compiler version, or perhaps the string library that is linked into + the crash binary, because it only has been seen on crash binaries built + with gcc-4.7. The fix now displays the full pathname, no longer dropping + the "/usr/src" from beginning. + + * Restricted the X86_64 "line_number_hook" to kernels earlier than 2.6.24, + i.e., kernels prior to the x86/x86_64 merge. Without the patch, the + manufactured filename information for assembly-language files was + incorrect for 2.6.24 and later kernels. Also, the kernel debuginfo data + now has file/line-number data for assembly-language files as well, + obviating the need for the hook. + + * Fix for the extensions/trace.c extension module to prevent a double free + exception that would occur if a calloc() call fails during module + initialization. + + * Fix for the "p -u" option if a 32-bit kernel symbol is incorrectly passed + as an argument. Without the patch, the command fails, but the next + command requiring the services of the embedded gdb module will generate an + error message of the sort "*** glibc detected *** crash: free(): invalid + pointer:
***", or "*** glibc detected *** crash: munmap_chunk(): + invalid pointer:
***", followed by a backtrace, and an abort of + the crash session. + + * Fix for the embedded gdb module to correctly handle kernel modules whose + ELF header contains "__ksymtab" and "__ksymtab_gpl" sections with non-zero + nonsensical "Address" values. + + * Without the patch, if one of the odd sections above is encountered, the + "Offset" values of the remaining sections are not processed; and if the + module's .data section is ignored, gdb incorrectly calculates the address + of all symbols in the module's .data section, leading to incorrect output + if, for example, data is printed with the gdb "p" command. This invalid + ELF section format was introduced in Linux 3.0 by the kernel's + "scripts/module-common.lds" file. + + * Fix for the "runq -g" option if the kernel contains more than 200 task + groups. Without the patch, the command generates a segmentation + violation. + + -- Troy Heber Wed, 13 Feb 2013 09:28:40 -0700 + +crash (6.1.1-1) UNRELEASED; urgency=low + + * New upstream version 6.1.1 + + * Fixes for the ARM "vtop" command display of kernel unity-mapped virtual + addresses. Without the patch, the PGD, PMD values may be incorrect, and + the PAGE value is always incorrectly calculated. + + * Fix for Linux 2.6.34 and later kernels that are configured with + CONFIG_SLUB, but not configured with CONFIG_IKCONFIG, to be able to + determine the kernel's CONFIG_NR_CPUS value. Without the patch, if the + actual number of cpus is larger than the crash utility's per-architecture + NR_CPUS maximum value, then the cpus beyond the NR_CPUS limit would not be + accounted for. + + * Increment the X86_64 NR_CPUS maximum value from 4096 to 5120. + + * Try to determine whether the kernel is running as a virtual machine by + using any available kernel-specific data or by dumpfile type. The results + of the hypervisor type search will be stored in the internal kernel_table + data structure, and if a hypervisor type can be determined, its name will + be displayed by the "mach" command. The result of the hypervisor + determination, successful or otherwise, may be viewed during session + initialization if the -d command line option is invoked, or during + runtime via the "help -k" option. Only applicable to the X86, X86_64 and + IA64 architectures. + + * Allow the "ps command" and "foreach name" command options to contain more + than the kernel's maximum of 15 characters that are stored in each task's + task_struct.comm[] array. Without the patch, the two string arguments + were required to be the possibly-truncated command name string in order to + match. + + * Enhancement to the "ps" command to allow any of the "command" arguments to + be POSIX extended regular expressions. The expression string must be + encompassed by "'" characters, and will be matched against the names of + all tasks. + + * Add support for 2GB pages in the S390X virtual-to-physical address + translation function. Required for the new IBM zEC12 Mainframe. + + * Initial preparation for support of the ARM64 architecture. + + * Fix for the "log" command if a kernel message contains either a '\n' or a + '\t'. Without the patch, the two characters are replaced with a '.', and + the message continues. With the patch applied, the characters are + printed, and if it is a '\n', spaces are inserted after the linefeed so + that the subsequent characters in the message line up appropriately under + the preceding line. + + * Fix for the "kmem -[sS]" options on kernels that configured with both + CONFIG_SLUB and CONFIG_NODES_SHIFT, and that are running on hardware that + generates NUMA node ids that are not numbered consecutively. Without the + patch, both command options fail with the error message "kmem: invalid + kernel virtual address: 8 type: kmem_cache_node nr_partial". + + * Fix for the "trace.so" extension module's "trace show" command. Without + the patch, the output showing each trace point is shown with two + hexadecimal virtual addresses instead of displaying them symbolically + using the format " <-- ". + + * Fixes for handling incomplete/invalid ELF or compressed kdump vmcores + whose per-cpu NT_PRSTATUS notes are missing. For example, this has been + seen to happen when kexec/kdump incorrectly recognizes a Xen DomU kernel + as a Xen Dom0 kernel. Without the patch, possible ramifications would be + a NULL pointer dereference during session intialization when searching for + the panic task, or during the "bt" command on an active task. + + * Implemented a new "runq -g" option that displays CFS runqueue tasks + hierarchically by task_group. Tasks in throttled groups are also + displayed. The "runq" command with no option will no longer display + task_group data for the RT queue. + + * Patchset for Xen support up to version 4.2: + + * Fix for the S390X virtual-to-physical address translation to allow the HW + Change-bit override bit (0x100) to be used in page table entries. + + * Fix for a rarely-seen circumstance in which a kdump ELF vmcore of a Xen + dom0 kernel gets incorrectly identified as a old-style netdump ELF vmcore. + This has only been seen after the original kdump ELF vmcore was + transformed via "makedumpfile -d1". Without the patch, the crash session + fails during initialization with the messages "crash: invalid size + request: 0 type: xen kdump p2m mfn page", followed by "crash: cannot read + xen kdump p2m mfn page". If run against the Xen hypervisor, the session + fails during initialization with the error message "crash: read error: + kernel virtual address:
type: crashing_cpu". + + -- Troy Heber Wed, 13 Feb 2013 09:28:40 -0700 + +crash (6.1.0-1ubuntu2) raring; urgency=low + + * Make crash depend on binutils. (LP: #251288) + Crash uses the program strings to match vmlinux and cores. + + -- Chris J Arges Fri, 04 Jan 2013 17:26:06 -0600 + +crash (6.1.0-1ubuntu1) raring; urgency=low + + * Merge from Debian unstable (LP: #1064475). Remaining changes: + - debian/patches/01_spu_commands.patch + + Provides SPU extension support + + Enable SPU extension only on PPC (using .mk logic) + - debian/rules: + + Always build extensions and package them. + + Cleanup for extensions + + -- Stefan Bader Thu, 25 Oct 2012 16:29:52 +0200 + +crash (6.1.0-1) unstable; urgency=low + + * Fix for 32-bit SADUMP dumpfiles to correctly check whether a requested + physical address is within the 0-640K backup region. Without the patch, + requested physical addresses that are larger than 32-bits are truncated to + 32-bit values, leading to unexpected results. + + * Added support for the ELF dumpfile type that is generated by the new + "virsh dump --memory-only" option. The "--memory-only" option uses a new + "dump-guest-memory" QEMU monitor command that creates an ELF kdump vmcore + clone. The "virsh dump" command continues to borrow the "migrate" QEMU + monitor command to create a file that is designed for guest migration, and + not well-suited for a vmcore because it is not designed for random-access + of physical memory. A new "help -r" option has been added to dump the + registers that are stored in per-cpu "QEMU" ELF notes; those notes are + used to distinguish this dumpfile type from regular kdump ELF vmcores. + The patch also combines common functionality between the new format and + the SADUMP format. + + * Fix for the "runq" command for kernels that have the CFS scheduler. + Without the patch, a cpu's RT runqueue may incorrectly display "[no tasks + queued]" when in fact there are tasks on its queue. + + * In the highly-unlikely event that a pre-Linux 3.5 kernel's log buffer + cannot be read during initialization, display a message indicating + "WARNING: cannot read log_buf contents", and just continue. Without the + patch, a "readmem" error would be displayed and the crash session would be + killed. + + * Updated the "net -a" option to support Linux 2.6.9 to 3.6.0. Without the + patch, the option displayed "net: -a option not supported or applicable on + this architecture or kernel". + + * Enhanced the "net -a" option to show the struct neighbour address + associated with each line of output. + + * Fix for the "runq" command for kernels that are configured with + CONFIG_RT_GROUP_SCHED. Without the patch, tasks contained within an RT + group scheduling entity are not displayed. + + * Fix for "crash --version" or "crash -v" to prevent the sourcing of a + .gdbinit file that is located in the current directory. + + * Preemptive fix to handle this patch to the x86 devmem_is_allowed() + function that was posted on the Linux Kernel Mailing List here: + https://lkml.org/lkml/2012/8/28/357 If the proposed kernel patch put into + place, a failed attempt to use /dev/mem when the kernel is configured with + CONFIG_STRICT_DEVMEM will not result in an automatic attempt to use + /proc/kcore. With this crash utility patch, the automatic switch to + /proc/kcore will be attempted regardless whether the kernel patch is + accepted or not. + + * Patch for CVE-2012-3509: libiberty: objalloc_alloc integer overflows + + * Fix for Linux 3.0 and later kernels that have been configured with + CONFIG_SLAB, and without CONFIG_NODES_SHIFT (or have set it to 0). + Without the patch, the warning messages "crash: nr_node_ids: symbol does + not exist" and "crash: unable to initialize kmem slab cache subsystem" are + displayed during initialization, and the "kmem -[sS]" options fail with + the message "kmem: kmem cache slab subsystem not available". + + * Allow the build procedure to use an alternate compiler by passing "make + CC=" to the top-level Makefile. + + * Allow the user to append options to the "configure" script that is invoked + by the initial embedded gdb build procedure. The additional options + should be put in a file named "GDBFLAGS.extra" located in the top-level + directory. + + * Change for the "ps" command if a task is stopped due to the task being + traced by another task. Without the patch, the traced task is shown with + the "ST" (stopped) status; with the patch it will be shown with a "TR" + ncement of the "task" command to display both the task_struct and the + thread_info structures of a task. The -R option accepts members of + either/both structure types. + * The "TR" state has been added to the "foreach" command's list of task + state qualifiers. Without the patch, there is no way to filter out tasks + that are stopped due to being traced by another task. + + * Fix for passing a a "gdb" command to a crash session via a pipe if there + are any spaces preceding the "gdb" command name in the string. Without + the patch, the command will fail with the error message "gdb: gdb request + failed: ". + + * Preparation for the future S390/S390X structure name change from + "_lowcore" to "lowcore". The patch checks which structure is defined and + uses the correct name. + + * Replaced datatype_info() calls in do_radix_tree() and do_rdtree() with + preferred MEMBER_SIZE() macro. + + -- Troy Heber Tue, 23 Oct 2012 09:48:28 -0600 + +crash (6.0.9-1) UNRELEASED; urgency=low + + * Fix for building on host machines that have glibc-2.15.90 installed, in + which case the glibc header file /usr/include/bits/siginfo.h no longer + declares a "struct siginfo", but only the "siginfo_t" typedef. Without + the patch, the build of the embedded gdb module fails with the error + message "linux-nat.h:63:18: error: field 'siginfo' has incomplete type". + + * Add support for reading compressed kdump dumpfiles that were compressed by + the snappy compressor. This feature is disabled by default. To enable + this feature, build the crash utility in the following manner: (1) Install + the snappy libraries by using the host system's package manager or by + directly downloading libraries from author's website. The packages + required are: - snappy - snappy-devel The author's website is: + http://code.google.com/p/snappy (2) Create a CFLAGS.extra file and an + LDFLAGS.extra file in top-level crash sources directory: - enter -DSNAPPY + in the CFLAGS.extra file - enter -lsnappy in the LDFLAGS.extra file. (3) + Build crash with "make" as always. + + * Prevent the "ptov" command from returning an invalid virtual address on + 32-bit architectures. Without the patch, the command may result in an + invalid virtual address if the physical address entered cannot be accessed + by a unity-mapped kernel virtual address. The patch verifies that the + calculated virtual address can be translated back into the supplied + physical address. + + * Fix to automatically try /proc/kcore as an alternative live memory source + when the /dev/crash driver does not exist and /dev/mem is unusable because + the kernel was configured with CONFIG_STRICT_DEVMEM. Without the patch, + the automatic switch from /dev/mem to /proc/kcore is only attempted on the + X86 and X86_64 architectures. + + * Added missing linefeeds to several error messages in makedumpfile.c. + + * Fix for a regression introduced by a crash-5.1.1 patch that reworked the + handling of "set" commands that are put in .crashrc files, such that only + certain command options would get resolved before the crash session is + initialized. Without this patch, the "--less", "--more", "--no_scroll" + and "--CRASHPAGER" crash command line options do not properly override + conflicting "set scroll