diff -Nur ksymoops-2.4.6/Changelog ksymoops-2.4.7/Changelog --- ksymoops-2.4.6/Changelog Sun Jul 21 22:47:01 2002 +++ ksymoops-2.4.7/Changelog Sun Oct 13 21:18:54 2002 @@ -1,3 +1,24 @@ +2002-10-13 Keith Owens + + ksymoops 2.4.7 + + * Add BFD_PREFIX, DEF_TARGET, DEF_ARCH, CROSS options to Makefile to + support building ksymoops for cross compilation and debugging. + Greg Banks, modified by Keith Owens. + * Add cross compile documentation to INSTALL and man page. Keith Owens. + * Add DEF_TARGET, DEF_ARCH to ksymoops.c to build ksymoops for cross + compile. Attempt to set the default value for the -e flag if build + and cross environments have different endianess. Greg Banks. + * Extends Oops_truncate_address() to deal with the ckseg0/ kseg0/xkphys + physical address alias confusion on mips64 (addresses appear in the + oops text as 0xffffffff8xxxxxxx, 0x8xxxxxxx, or 0xa80000000xxxxxxx, + but are all the same physical address). Greg Banks. + * Calls Oops_truncate_address() from Oops_trace_line() so that the call + trace is subject to the address fix. Greg Banks. + * Handle exported symbols in sbss sections. Keith Owens. + * White space cleanup. + * Add IA64 MCA support. + 2002-07-20 Keith Owens ksymoops 2.4.6 diff -Nur ksymoops-2.4.6/INSTALL ksymoops-2.4.7/INSTALL --- ksymoops-2.4.6/INSTALL Fri Jan 5 13:06:38 2001 +++ ksymoops-2.4.7/INSTALL Sun Oct 13 20:46:12 2002 @@ -10,25 +10,43 @@ binutils is all that is required. On Debian systems, bfd.h (at least) is in a separate package, binutils-dev. -This code is a complete replacement for the ksymoops in the Linux kernel. If -you wish to keep ksymoops in the kernel, you can +Some people have reported problems building ksymoops, with unresolved +references in libbfd (htab_create, htab_find_slot_with_hash). Try +http://www.cs.helsinki.fi/linux/linux-kernel/2002-13/0196.html first, +if that does not work, contact the binutils maintainers. This is not a +ksymoops problem, ksymoops only uses libbfd. Any unresolved references +from libbfd are a binutils problem. -cd linux/scripts -rm -rf ksymoops -tar xzvf /somewhere/ksymoops-n.n.tar.gz -mv ksymoops-* ksymoops -cd ksymoops -make -make install - -However I recommend that you keep this code outside the kernel. It was never -meant to be part of the kernel sources but somebody (not me) asked Linus to -include it. - -Compiling and linking against a non-standard binutils. -====================================================== - -If you need to compile and link against a version of binutils which is -not in the standard location, be careful to define the location of the -bfd include files as well as libbfd. Add -I/non/standard/bfd to -CFLAGS; add -L/non/standard/bfd to the link line, just before -lbfd. + +Building ksymoops for cross compile and debugging +================================================= + +When you are building a kernel using a cross compiler, it may be useful to +build a dedicated version of ksymoops for this cross compile environment. +It is not necessary to do so, you can always use the native ksymoops with +suitable options (e.g. the e, t and a flags), together with environment +variables KSYMOOPS_NM and KSYMOOPS_OBJDUMP. It may be more convenient to +build a special version of ksymoops and install it along with the other cross +compile tools. + +At build time you can specify the CROSS, BFD_PREFIX, DEF_TARGET and DEF_ARCH +options to make. For example, + + make BFD_PREFIX=/usr/mips64-linux \ + DEF_TARGET='\"elf64-bigmips\"' \ + DEF_ARCH='\"mips:8000\"' \ + CROSS=mips64-linux- + +will build ksymoops - + +* using bfd files from /usr/mips64-linux/include and /usr/mips64-linux/lib + (BFD_PREFIX) +* the default value for -t will be "elf64-bigmips" (DEF_TARGET) +* the default value for -a will be "mips:8000" (DEF_ARCH) +* the result will be installed as /usr/bin/mips64-linux-ksymoops (CROSS) +* it will default to using /usr/bin/mips64-linux-{nm,objdump} (INSTALL_PREFIX, + /bin and CROSS). + +Any variable starting with DEF_ takes a string value. These variables go +through two levels of expansion, shell (use '...' to avoid shell expansion), +and make commands (prefix " with \ to preserve " characters). diff -Nur ksymoops-2.4.6/Makefile ksymoops-2.4.7/Makefile --- ksymoops-2.4.6/Makefile Sun Apr 22 19:17:06 2001 +++ ksymoops-2.4.7/Makefile Sun Oct 13 19:13:59 2002 @@ -11,65 +11,104 @@ # that rarely appears in filenames and does not cause problems like '%' or '$'. # RedHat users might want defaults like these -# DEF_MAP = \"/boot/System.map-*r\" -# DEF_OBJECTS = \"/boot/module-info-*r\" +# DEF_MAP := \"/boot/System.map-*r\" -DEF_VMLINUX = # default no vmlinux -DEF_KSYMS = \"/proc/ksyms\" # default current ksyms -DEF_LSMOD = \"/proc/modules\" # default current lsmod -DEF_OBJECTS = \"/lib/modules/*r/\" # default current modules -DEF_MAP = \"/usr/src/linux/System.map\" # default current map +DEF_VMLINUX := # default no vmlinux +DEF_KSYMS := \"/proc/ksyms\" # default current ksyms +DEF_LSMOD := \"/proc/modules\" # default current lsmod +DEF_OBJECTS := \"/lib/modules/*r/\" # default current modules +DEF_MAP := \"/usr/src/linux/System.map\" # default current map + +# Cross compile program prefix for installing cross ksymoops, and +# running binutils (objdump & nm), normally empty for system binutils + +# If you are building for a cross compile, these sample values might be useful. +# DEF_TARGET := \"elf64-bigmips\" +# DEF_ARCH := \"mips:8000\" +# CROSS := mips64-linux- +# BFD_PREFIX := /usr/mips64-linux + +# Prefix for finding BFD library, normally empty for system bfd +BFD_PREFIX := +DEF_TARGET := # default bfd target, empty for system +DEF_ARCH := # default bfd arch, empty for system +CROSS := # prefix for installed program, nm, objdump # Prefix for install libraries -INSTALL_PREFIX=/usr +INSTALL_PREFIX := /usr # Install program -INSTALL=/usr/bin/install +INSTALL := /usr/bin/install -DEFS = Makefile ksymoops.h +# Assignment followed by a comment includes the spaces between the value and the +# comment as part of the value, so strip those extra spaces. +override DEF_VMLINUX := $(strip $(DEF_VMLINUX)) +override DEF_KSYMS := $(strip $(DEF_KSYMS)) +override DEF_LSMOD := $(strip $(DEF_LSMOD)) +override DEF_OBJECTS := $(strip $(DEF_OBJECTS)) +override DEF_MAP := $(strip $(DEF_MAP)) +override DEF_TARGET := $(strip $(DEF_TARGET)) +override DEF_ARCH := $(strip $(DEF_ARCH)) +override INSTALL_PREFIX := $(strip $(INSTALL_PREFIX)) +override CROSS := $(strip $(CROSS)) +override BFD_PREFIX := $(strip $(BFD_PREFIX)) -PROGS = ksymoops +DEFS := Makefile ksymoops.h -CC=gcc +PROGS := ksymoops + +CC := gcc CFLAGS += -Dlinux \ -Wall \ -Wno-conversion \ -Waggregate-return \ -Wstrict-prototypes \ -Wmissing-prototypes \ + -DINSTALL_PREFIX="\"$(INSTALL_PREFIX)\"" \ + -DCROSS="\"$(CROSS)\"" \ $(DEBUG) -ifneq ($(strip $(DEF_VMLINUX)),) - CFLAGS += -DDEF_VMLINUX=$(strip $(DEF_VMLINUX)) +ifneq ($(DEF_VMLINUX),) + CFLAGS += -DDEF_VMLINUX=$(DEF_VMLINUX) +endif +ifneq ($(DEF_KSYMS),) + CFLAGS += -DDEF_KSYMS=$(DEF_KSYMS) +endif +ifneq ($(DEF_LSMOD),) + CFLAGS += -DDEF_LSMOD=$(DEF_LSMOD) +endif +ifneq ($(DEF_OBJECTS),) + CFLAGS += -DDEF_OBJECTS=$(DEF_OBJECTS) endif -ifneq ($(strip $(DEF_KSYMS)),) - CFLAGS += -DDEF_KSYMS=$(strip $(DEF_KSYMS)) +ifneq ($(DEF_MAP),) + CFLAGS += -DDEF_MAP=$(DEF_MAP) endif -ifneq ($(strip $(DEF_LSMOD)),) - CFLAGS += -DDEF_LSMOD=$(strip $(DEF_LSMOD)) +ifneq ($(DEF_TARGET),) + CFLAGS += -DDEF_TARGET=$(DEF_TARGET) endif -ifneq ($(strip $(DEF_OBJECTS)),) - CFLAGS += -DDEF_OBJECTS=$(strip $(DEF_OBJECTS)) +ifneq ($(DEF_ARCH),) + CFLAGS += -DDEF_ARCH=$(DEF_ARCH) endif -ifneq ($(strip $(DEF_MAP)),) - CFLAGS += -DDEF_MAP=$(strip $(DEF_MAP)) +ifneq ($(BFD_PREFIX),) + CFLAGS += -I$(BFD_PREFIX)/include + LDFLAGS += -L$(BFD_PREFIX)/lib endif -ifeq ($(strip $(INSTALL_MANDIR)),) +ifeq ($(INSTALL_MANDIR),) INSTALL_MANDIR := $(INSTALL_PREFIX)/man endif -STATIC = -Wl,-Bstatic -DYNAMIC = -Wl,-Bdynamic +STATIC := -Wl,-Bstatic +DYNAMIC := -Wl,-Bdynamic -OBJECTS = io.o ksyms.o ksymoops.o map.o misc.o object.o oops.o re.o symbol.o +OBJECTS := io.o ksyms.o ksymoops.o map.o misc.o object.o oops.o re.o symbol.o -all: $(PROGS) +all: $(PROGS) : $(OBJECTS) $(OBJECTS): $(DEFS) $(PROGS): %: %.o $(DEFS) $(OBJECTS) - $(CC) $(OBJECTS) $(CFLAGS) $(STATIC) -lbfd -liberty $(DYNAMIC) -o $@ + $(CC) $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(STATIC) -lbfd -liberty $(DYNAMIC) -o $@ -@size $@ clean: @@ -77,6 +116,6 @@ install: all $(INSTALL) -d $(INSTALL_PREFIX)/bin - $(INSTALL) ksymoops $(INSTALL_PREFIX)/bin + $(INSTALL) ksymoops $(INSTALL_PREFIX)/bin/$(CROSS)ksymoops $(INSTALL) -d $(INSTALL_MANDIR)/man8 - $(INSTALL) ksymoops.8 $(INSTALL_MANDIR)/man8 + $(INSTALL) ksymoops.8 $(INSTALL_MANDIR)/man8/$(CROSS)ksymoops.8 diff -Nur ksymoops-2.4.6/ksymoops.8 ksymoops-2.4.7/ksymoops.8 --- ksymoops-2.4.6/ksymoops.8 Sun Jul 21 22:47:01 2002 +++ ksymoops-2.4.7/ksymoops.8 Sun Oct 13 20:46:12 2002 @@ -289,12 +289,12 @@ # ksymoops1 while (true) do - ksymoops -1 > $HOME/oops1 - if [ $? -eq 3 ] - then - exit 0 # end of input, no Oops found - fi - mail -s Oops admin < $HOME/oops1 + ksymoops -1 > $HOME/oops1 + if [ $? -eq 3 ] + then + exit 0 # end of input, no Oops found + fi + mail -s Oops admin < $HOME/oops1 done tail -f /var/log/messages | ksymoops1 @@ -778,13 +778,13 @@ .SH ENVIRONMENT VARIABLES .TP KSYMOOPS_NM -Path for nm, defaults to /usr/bin/nm. +Path for nm, defaults to ${INSTALL_PREFIX}/bin/${CROSS}nm. .TP KSYMOOPS_FIND Path for find, defaults to /usr/bin/find. .TP KSYMOOPS_OBJDUMP -Path for objdump, defaults to /usr/bin/objdump. +Path for objdump, defaults to ${INSTALL_PREFIX}/bin/${CROSS}objdump. .SH CROSS SYSTEM OOPS DIAGNOSIS .P To process an Oops from one system on another, you need access to all @@ -801,6 +801,10 @@ use the --rpath option when linking ksymoops or the LD_LIBRARY_PATH environment variable when running ksymoops. See the info pages for ld and /usr/doc/glibc*/FAQ. +You can also build a version of ksymoops that is dedicated to the cross +compile environment by using the BFD_PREFIX, DEF_TARGET, DEF_ARCH and +CROSS options at build time. +See INSTALL in the ksymoops source package for more details. .SH DIAGNOSTICS .HP 4m 0\ -\ normal. diff -Nur ksymoops-2.4.6/ksymoops.c ksymoops-2.4.7/ksymoops.c --- ksymoops-2.4.6/ksymoops.c Sun Jul 21 22:47:01 2002 +++ ksymoops-2.4.7/ksymoops.c Sun Oct 13 20:46:12 2002 @@ -9,7 +9,7 @@ Released under the GNU Public Licence, Version 2. */ -#define VERSION "2.4.6" +#define VERSION "2.4.7" #include "ksymoops.h" #include @@ -20,11 +20,12 @@ #include #include #include +#include char *prefix; -char *path_nm = "/usr/bin/nm"; /* env KSYMOOPS_NM */ +char *path_nm = INSTALL_PREFIX"/bin/"CROSS"nm"; /* env KSYMOOPS_NM */ char *path_find = "/usr/bin/find"; /* env KSYMOOPS_FIND */ -char *path_objdump = "/usr/bin/objdump"; /* env KSYMOOPS_OBJDUMP */ +char *path_objdump = INSTALL_PREFIX"/bin/"CROSS"objdump"; /* env KSYMOOPS_OBJDUMP */ int debug = 0; int errors = 0; int warnings = 0; @@ -56,7 +57,7 @@ static void usage(void) { - static const char usage_text[] = + static const char usage_text[] = "\t[-v vmlinux] [--vmlinux=vmlinux]\n\t\t\t\t\tWhere to read vmlinux\n" "\t[-V] [--no-vmlinux]\t\tNo vmlinux is available\n" "\t[-k ksyms] [--ksyms=ksyms]\tWhere to read ksyms\n" @@ -144,6 +145,16 @@ "-M" #endif "\n" +#ifdef DEF_TARGET + "\t\t\t" + "-t " DEF_TARGET + "\n" +#endif +#ifdef DEF_ARCH + "\t\t\t" + "-a " DEF_ARCH + "\n" +#endif "\n" ; printf("Version " VERSION "\n"); @@ -703,6 +714,25 @@ #endif #ifdef DEF_MAP options.system_map = DEF_MAP; +#endif +#ifdef DEF_TARGET + options.target = DEF_TARGET; + { + int target_byteorder; + + if (strstr(options.target, "-big")) + target_byteorder = __BIG_ENDIAN; + else if (strstr(options.target, "-little")) + target_byteorder = __LITTLE_ENDIAN; + else + target_byteorder = __BYTE_ORDER; + + if (target_byteorder != __BYTE_ORDER) + options.endianess = 1; + } +#endif +#ifdef DEF_ARCH + options.architecture = DEF_ARCH; #endif /* Not all include files define __u16, __u32, __u64 so do it the hard way. diff -Nur ksymoops-2.4.6/ksymoops.spec ksymoops-2.4.7/ksymoops.spec --- ksymoops-2.4.6/ksymoops.spec Sun Jul 21 22:47:01 2002 +++ ksymoops-2.4.7/ksymoops.spec Fri Sep 6 14:53:12 2002 @@ -1,6 +1,6 @@ Summary: Kernel oops and error message decoder Name: ksymoops -Version: 2.4.6 +Version: 2.4.7 Release: 1 Copyright: GPL Group: Utilities/System diff -Nur ksymoops-2.4.6/object.c ksymoops-2.4.7/object.c --- ksymoops-2.4.6/object.c Tue Jul 31 01:58:35 2001 +++ ksymoops-2.4.7/object.c Sun Oct 13 20:46:12 2002 @@ -209,7 +209,7 @@ if (p) ++p; else - p = ss_object[j]->source; + p = ss_object[j]->source; if (strcmp(p, basename) == 0) { DEBUG(1, "found %s for %s", ss_object[j]->source, file); free((char *)(ss->object)); @@ -256,7 +256,7 @@ } /* Map a symbol type to a section code. 0 - text, 1 - data, 2 - read only data, - * 3 - bss, 4 - C (cannot relocate), 5 - the rest. + * 3 - bss, 4 - sbss, 5 - C (cannot relocate), 6 - the rest. */ static int section(char type) { @@ -274,10 +274,13 @@ case 'B': case 'b': return 3; - case 'C': + case 'S': + case 's': return 4; - default: + case 'C': return 5; + default: + return 6; } } @@ -287,7 +290,7 @@ SYMBOL_SET *adjust_object_offsets(SYMBOL_SET *ss) { int i; - addr_t adjust[] = {0, 0, 0, 0, 0, 0}; + addr_t adjust[] = {0, 0, 0, 0, 0, 0, 0}; char type; SYMBOL *sk, *so; SYMBOL_SET *ssc; @@ -301,13 +304,15 @@ /* modutils assists have type G, the symbol contains the section name */ if (sk->type == 'G') { if (strstr(sk->name, "_S.text_")) - type = 'T'; + type = 'T'; else if (strstr(sk->name, "_S.rodata_")) - type = 'R'; + type = 'R'; else if (strstr(sk->name, "_S.data_")) - type = 'D'; + type = 'D'; else if (strstr(sk->name, "_S.bss_")) - type = 'B'; + type = 'B'; + else if (strstr(sk->name, "_S.sbss_")) + type = 'S'; else type = ' '; /* Assumption: all sections start at relative offset 0 */ @@ -315,7 +320,7 @@ } else if ((so = find_symbol_name(ssc, sk->name, NULL))) { if (!adjust[section(so->type)]) - adjust[section(so->type)] = sk->address - so->address; + adjust[section(so->type)] = sk->address - so->address; } } for (i = 0; i < ssc->used; ++i) { diff -Nur ksymoops-2.4.6/oops.c ksymoops-2.4.7/oops.c --- ksymoops-2.4.6/oops.c Sun Jul 21 22:47:01 2002 +++ ksymoops-2.4.7/oops.c Sun Oct 13 21:36:34 2002 @@ -1,7 +1,7 @@ /* oops.c. - Oops processing for ksymoop. + Oops processing for ksymoops. Copyright 1999 Keith Owens . Released under the GNU Public Licence, Version 2. @@ -638,6 +638,10 @@ static regex_t re_Oops_cris_regs; static regmatch_t *re_Oops_cris_regs_pmatch; static int s390_reg_num = -1; +#define MIPS64_CKSEG0_MASK 0xffffffff80000000ULL +#define MIPS64_CKSEG0_BASE 0xffffffff80000000ULL +#define MIPS64_KSEG0_BASE 0x0000000080000000ULL +#define MIPS64_XKPHYS5_BASE 0xa800000000000000ULL /* All address arithmetic is done in 64 bit mode, truncate to the result to * a valid range for the target. @@ -654,6 +658,20 @@ u32 &= 0x7fffffff; /* Really 31 bit addressing on i370/s390 */ address = u32; } + if (options->target && + strstr(options->target, "mips") && + strstr(options->target, "64")) { + /* + * Some address gymnastics are necessary due to the weird way + * in which mips64 kernel are built as elf32 then converted + * to elf64 after linking. + */ + if ((address & MIPS64_CKSEG0_MASK) == MIPS64_CKSEG0_BASE || + (address & MIPS64_CKSEG0_MASK) == MIPS64_KSEG0_BASE) { + /* normalise physical addrs in 32-bit kernel segments */ + address = (address & ~MIPS64_CKSEG0_MASK) | MIPS64_XKPHYS5_BASE; + } + } address &= truncate_mask; return(address); } @@ -687,7 +705,7 @@ if (strstr(options->target, "x86_64") || strstr(options->target, "x86-64") || strstr(options->target, "x8664")) - return("RIP"); + return("RIP"); return("???"); } @@ -708,6 +726,8 @@ static regmatch_t *re_Oops_eip_kdb_pmatch; static regex_t re_Oops_eip_ia64; static regmatch_t *re_Oops_eip_ia64_pmatch; + static regex_t re_Oops_mca_ip_ia64; + static regmatch_t *re_Oops_mca_ip_ia64_pmatch; static regex_t re_Oops_eip_cris; static regmatch_t *re_Oops_eip_cris_pmatch; static regex_t re_Oops_eip_other; @@ -811,7 +831,7 @@ i = regexec(&re_Oops_eip_ia64, line, re_Oops_eip_ia64.re_nsub+1, re_Oops_eip_ia64_pmatch, 0); - DEBUG(4, "regexec ia64 %d", i); + DEBUG(4, "regexec eip_ia64 %d", i); if (i == 0) { re_string_check(re_Oops_eip_ia64.re_nsub+1, string_max, procname); @@ -820,6 +840,26 @@ return((*string)[re_Oops_eip_ia64.re_nsub]); } + /* MCA 'IP' line for ia64. [x]ip at start of line, space, '('regname'), + * spaces, :, space, 0x, UNBRACKETED_ADDRESS. + */ + RE_COMPILE(&re_Oops_mca_ip_ia64, + "[xi]ip *\\([^)]*\\) *: *" + "0x" UNBRACKETED_ADDRESS, + REG_NEWLINE|REG_EXTENDED|REG_ICASE, + &re_Oops_mca_ip_ia64_pmatch); + + i = regexec(&re_Oops_mca_ip_ia64, line, re_Oops_mca_ip_ia64.re_nsub+1, + re_Oops_mca_ip_ia64_pmatch, 0); + DEBUG(4, "regexec mca_ip_ia64 %d", i); + if (i == 0) { + re_string_check(re_Oops_mca_ip_ia64.re_nsub+1, string_max, + procname); + re_strings(&re_Oops_mca_ip_ia64, line, re_Oops_mca_ip_ia64_pmatch, + string); + return((*string)[re_Oops_mca_ip_ia64.re_nsub]); + } + /* SGI kdb backtrace EIP. At start of line, 0x unbracketed * address, 0x unbracketed address, anything, '+0x'. The second * unbracketed address is the EIP. @@ -876,10 +916,10 @@ /* Oops 'EIP:' line for other architectures */ RE_COMPILE(&re_Oops_eip_other, "^(" - "EIP: +.*" /* i386 */ - "|RIP: +.*" /* x86_64 */ - "|PC *= *" /* m68k, alpha */ - "|pc *: *" /* arm */ + "EIP: +.*" /* i386 */ + "|RIP: +.*" /* x86_64 */ + "|PC *= *" /* m68k, alpha */ + "|pc *: *" /* arm */ ")" BRACKETED_ADDRESS , @@ -1153,10 +1193,10 @@ static const char procname[] = "Oops_ia64_b0"; /* Oops 'b0' line for ia64, b0 : unbracketed address, may be - * repeated for b6, b7. + * repeated for b6, b7. MCA has b0 '('regname')' : 0x unbracketed address. */ RE_COMPILE(&re_Oops_ia64_b0, - "^b[0-7] *: *" + "^b[0-7] *(\\([^)]*\\) *)?: *(0x)?" UNBRACKETED_ADDRESS, REG_NEWLINE|REG_EXTENDED|REG_ICASE, &re_Oops_ia64_b0_pmatch); @@ -1449,7 +1489,8 @@ } /* Process a trace call line, extract addresses */ -static void Oops_trace_line(const char *line, const char *p, SYMBOL_SET *ss) +static void Oops_trace_line(const char *line, const char *p, SYMBOL_SET *ss, + const OPTIONS *options) { char **string = NULL; regex_t *pregex; @@ -1482,8 +1523,11 @@ /* Loop over (un|rev)?bracketed addresses */ while (1) { if (regexec(pregex, p, pregex->re_nsub+1, pregmatch, 0) == 0) { + addr_t addr; re_strings(pregex, p, pregmatch, &string); - add_symbol(ss, string[1], 'T', 1, "Trace;"); + addr = hexstring(string[1]); + addr = Oops_truncate_address(addr, options); + add_symbol_n(ss, addr, 'T', 1, "Trace;"); p += pregmatch[0].rm_eo; } else if (strncmp(p, "from ", 5) == 0) @@ -1720,6 +1764,7 @@ "[^ ]+ kernel: +" /* syslogd */ "|<[0-9]+>" /* kmsg */ "|[0-9]+\\|[^|]+\\|[^|]+\\|[^|]+\\|" /* syslog-ng */ + "|[0-9][AC] [0-9]{3} [0-9]{3}[cir][0-9]{2}:" /* SNIA */ ")", REG_NEWLINE|REG_EXTENDED|REG_ICASE, &re_Oops_prefix_pmatch); @@ -1931,12 +1976,33 @@ /* SGI kdb */ "|ds *=" /* any other SGI kdb lines to print? */ - /* ia64 */ "|psr *:" - /* ia64 */ "|unat *: " - /* ia64 */ "|rnat *: " - /* ia64 */ "|ldrs *: " - /* ia64 */ "|[bfr][0-9]+ *: " + /* ia64 */ "|psr " + /* ia64 */ "|unat " + /* ia64 */ "|rnat " + /* ia64 */ "|ldrs " + /* ia64 */ "|xip " + /* ia64 */ "|iip " + /* ia64 */ "|ipsr " + /* ia64 */ "|ifa " + /* ia64 */ "|pr " + /* ia64 */ "|itc " + /* ia64 */ "|ifs " + /* ia64 */ "|bsp " + /* ia64 */ "|[bfr][0-9]+ " + /* ia64 */ "|irr[0-9] " /* ia64 */ "|General Exception" + /* ia64 */ "|MCA" + /* ia64 */ "|SAL" + /* ia64 */ "|Processor State" + /* ia64 */ "|Bank [0-9]+ " + /* ia64 */ "|Register Stack" + /* ia64 */ "|Processor Error Info" + /* ia64 */ "|proc err map" + /* ia64 */ "|proc state param" + /* ia64 */ "|proc lid" + /* ia64 */ "|processor structure" + /* ia64 */ "|check info" + /* ia64 */ "|target identifier" /* any other ia64 lines to print? */ /* CRIS */ "|IRP *: " @@ -2255,7 +2321,7 @@ if (f) fclose_local(f, procname); f = NULL; - if (strcmp(*(options->filename), "/dev/null") == 0 || + if (strcmp(*(options->filename), "/dev/null") == 0 || regular_file(*(options->filename), procname)) f = fopen_local(*(options->filename), "r", procname); if (f) @@ -2340,7 +2406,7 @@ * the equivalent of a trace entry. */ Oops_set_eip(string[1], &eip, &ss_format, me, ibfd, options); - Oops_trace_line(line, string[2], &ss_format); + Oops_trace_line(line, string[2], &ss_format, options); } if (Oops_eip_sparc_spinlock(text, &string, MAX_STRINGS, options)) { @@ -2350,7 +2416,7 @@ */ Oops_set_eip(string[2], &eip, &ss_format, me, ibfd, options); Oops_set_eip(string[3], &eip, &ss_format, me, ibfd, options); - Oops_trace_line(line, string[1], &ss_format); + Oops_trace_line(line, string[1], &ss_format, options); } if ((start = Oops_mips_ra(text, &string, MAX_STRINGS))) Oops_set_mips_ra(start, &ss_format); @@ -2361,7 +2427,7 @@ if ((start = Oops_s390_psw(text, &string, MAX_STRINGS))) Oops_set_s390_psw(start, &ss_format, me, ibfd, options); if ((start = Oops_trace(text))) - Oops_trace_line(text, start, &ss_format); + Oops_trace_line(text, start, &ss_format, options); if ((start = Oops_regs(text))) Oops_set_regs(text, start, &ss_format, options); if ((start = Oops_s390_regs(text)))