I tried to load the dump and vmlinux with crash 8.0.5 tools, and it reported the error as below. From the tests, I found that gdb 10.2 was the problem, whereas gdb 13.1 was able to load the vmlinux with no issues.
I tried to compile crash 8.0.5 with gdb 13.1; however, it compiled with some errors.
Could you please upgrade the gdb version to the newest?
Thanks.
crash 8.0.5 loads the dump and vmlinux with below errors.
$crash ./symbols/symbols/kernel/vmlinux SYS_COREDUMP
crash 8.0.5
Copyright (C) 2002-2024 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011, 2020-2024 NEC Corporation
Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
Copyright (C) 2015, 2021 VMware, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for details.
BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section .relr.dyn' <=== ERROR!!! BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section.relr.dyn' <=== ERROR!!!
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux".
Type "show configuration" for configuration details.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section `.relr.dyn'
BFD: ./symbols/symbols/kernel/vmlinux: unable to initialize decompress status for section .debug_aranges
"0x7fff3da6eaf0s": not in executable format: file format not recognized
crash: ./symbols/symbols/kernel/vmlinux: no debugging data available
gdb 10.2 loads the vmlinux with below errors.
$gdb ./symbols/symbols/kernel/vmlinux
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux".Type "show configuration" for configuration details.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section `.relr.dyn'
BFD: ./symbols/symbols/kernel/vmlinux: unable to initialize decompress status for section .debug_aranges
"./symbols/symbols/kernel/vmlinux": not in executable format: file format not recognized
(gdb) q
gdb 13.1 loads the vmlinux with no problem.
$~/bin/crash_git/gdb-13.1/gdb/gdb ./symbols/symbols/kernel/vmlinux
GNU gdb (GDB) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./symbols/symbols/kernel/vmlinux...
(gdb) q
I tried to compile crash 8.0.5 with gdb 13.1; however, it compiled with some errors.
1) Below is my patch upgrading the gdb version from 10.2 to 13.1. Please correct me if I have make mistake.
diff --git a/Makefile b/Makefile
index 60dad1870a92..725979077090 100644
--- a/Makefile
+++ b/Makefile
@@ -24,8 +24,8 @@ PROGRAM=crash
Supported targets: X86 ALPHA PPC IA64 PPC64 SPARC64
I tried to load the dump and vmlinux with crash 8.0.5 tools, and it reported the error as below. From the tests, I found that gdb 10.2 was the problem, whereas gdb 13.1 was able to load the vmlinux with no issues. I tried to compile crash 8.0.5 with gdb 13.1; however, it compiled with some errors. Could you please upgrade the gdb version to the newest? Thanks.
crash 8.0.5 loads the dump and vmlinux with below errors. $crash ./symbols/symbols/kernel/vmlinux SYS_COREDUMP crash 8.0.5 Copyright (C) 2002-2024 Red Hat, Inc. Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation Copyright (C) 1999-2006 Hewlett-Packard Co Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited Copyright (C) 2006, 2007 VA Linux Systems Japan K.K. Copyright (C) 2005, 2011, 2020-2024 NEC Corporation Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc. Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. Copyright (C) 2015, 2021 VMware, Inc. This program is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Enter "help copying" to see the conditions. This program has absolutely no warranty. Enter "help warranty" for details.
BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section
.relr.dyn' <=== ERROR!!! BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section
.relr.dyn' <=== ERROR!!! GNU gdb (GDB) 10.2 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux". Type "show configuration" for configuration details. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.For help, type "help". Type "apropos word" to search for commands related to "word"... BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section `.relr.dyn' BFD: ./symbols/symbols/kernel/vmlinux: unable to initialize decompress status for section .debug_aranges "0x7fff3da6eaf0s": not in executable format: file format not recognized
crash: ./symbols/symbols/kernel/vmlinux: no debugging data available
gdb 10.2 loads the vmlinux with below errors. $gdb ./symbols/symbols/kernel/vmlinux GNU gdb (GDB) 10.2 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux".Type "show configuration" for configuration details. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... BFD: ./symbols/symbols/kernel/vmlinux: unknown type [0x13] section `.relr.dyn' BFD: ./symbols/symbols/kernel/vmlinux: unable to initialize decompress status for section .debug_aranges "./symbols/symbols/kernel/vmlinux": not in executable format: file format not recognized (gdb) q
gdb 13.1 loads the vmlinux with no problem. $~/bin/crash_git/gdb-13.1/gdb/gdb ./symbols/symbols/kernel/vmlinux GNU gdb (GDB) 13.1 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./symbols/symbols/kernel/vmlinux... (gdb) q
I tried to compile crash 8.0.5 with gdb 13.1; however, it compiled with some errors. 1) Below is my patch upgrading the gdb version from 10.2 to 13.1. Please correct me if I have make mistake. diff --git a/Makefile b/Makefile index 60dad1870a92..725979077090 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ PROGRAM=crash
Supported targets: X86 ALPHA PPC IA64 PPC64 SPARC64
2) Below is the error log. CXX varobj.o GEN stamp-version CXX version.o GEN xml-builtin.c CXX xml-builtin.o CXX xml-support.o CXX xml-syscall.o CXX xml-tdesc.o GEN init.c CXX init.o CXXLD gdb (test "ln -s" = "ln -s" && \ ln -s ./all-cfg.texi gdb-cfg.texi) || \ ln ./all-cfg.texi gdb-cfg.texi || \ cp ./all-cfg.texi gdb-cfg.texi date=
sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' ./../../bfd/version.h
; \ sed -e "s/DATE/$date/" < ./../version.in > version.subst echo "@set GDBVNsed q version.subst
" > ./GDBvn.new if [ -n "(GDB) " ]; then \ echo "@set VERSION_PACKAGE (GDB) " >> ./GDBvn.new; \ fi echo "@set BUGURL " >> ./GDBvn.new if [ "" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \ echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \ fi if test -z "-I ./../../readline/readline/doc"; then \ echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \ fi if [ -n "" ]; then \ echo "@set SYSTEM_GDBINIT " >> ./GDBvn.new; \ fi if [ -n "" ]; then \ echo "@set SYSTEM_GDBINIT_DIR " >> ./GDBvn.new; \ fi mv GDBvn.new GDBvn.texi makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I ./../../readline/readline/doc -I ./../mi -I . \ -o gdb.info ./gdb.texinfo makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I . -o stabs.info ./stabs.texinfo makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I . -o annotate.info ./annotate.texinfo rm -rf ./syscalls mkdir ./syscalls files='gdb-syscalls.dtd freebsd.xml netbsd.xml aarch64-linux.xml amd64-linux.xml arm-linux.xml i386-linux.xml mips-n32-linux.xml mips-n64-linux.xml mips-o32-linux.xml ppc-linux.xml ppc64-linux.xml s390-linux.xml s390x-linux.xml sparc-linux.xml sparc64-linux.xml' ; \ for file in $files ; do \ f=./../syscalls/$file ; \ if test -f $f ; then \ /usr/bin/install -c -m 644 $f ./syscalls ; \ fi ; \ done touch stamp-syscalls rm -rf ./python files='' ; \ if test "x$files" != x ; then \ for file in $files ; do \ dir=echo "$file" | sed 's,/[^/]*$,,'
; \ /bin/bash ./../../mkinstalldirs ./python/$dir ; \ /usr/bin/install -c -m 644 ./../python/lib/$file ./python/$dir ; \ done ; \ fi touch stamp-python rm -rf ./guile if test "x" != x ; then \ files='./gdb.scm gdb/boot.scm gdb/experimental.scm gdb/init.scm gdb/iterator.scm gdb/printing.scm gdb/support.scm gdb/types.scm' ; \ for file in $files ; do \ dir=echo "$file" | sed 's,/[^/]*$,,'
; \ /bin/bash ./../../mkinstalldirs ./guile/$dir ; \ /usr/bin/install -c -m 644 ./../guile/lib/$file ./guile/$dir ; \ done ; \ files='./gdb.go gdb/experimental.go gdb/iterator.go gdb/printing.go gdb/support.go gdb/types.go' ; \ cd ./guile ; \ for go in $files ; do \ source="echo $go | sed 's/\.go$/.scm/'
" ; \ echo compile -Warity-mismatch -Wformat -Wunused-toplevel -L . -o "$go" "$source" ; \ compile -Warity-mismatch -Wformat -Wunused-toplevel -L . -o "$go" "$source" || exit 1 ; \ done ; \ fi touch stamp-guile rm -rf ./system-gdbinit mkdir ./system-gdbinit files='elinos.py wrs-linux.py' ; \ for file in $files ; do \ f=./../system-gdbinit/$file ; \ if test -f $f ; then \ /usr/bin/install -c -m 644 $f ./system-gdbinit ; \ fi ; \ done touch stamp-system-gdbinit make[3]: Nothing to be done for 'all-target'.crash build failed
make[1]: [Makefile:267: gdb_merge] Error 1 make: [Makefile:258: all] Error 2
Thank you very much.