From: Vivek Goyal <vgoyal@in.ibm.com>
To: gdb@sourceware.org
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Andi Kleen <ak@suse.de>,
Kexec Mailing List <kexec@lists.infradead.org>
Subject: gdb 6.5 does not open linux kernel core file properly
Date: Tue, 01 May 2007 10:42:00 -0000 [thread overview]
Message-ID: <20070501104231.GA5204@in.ibm.com> (raw)
Hi,
I am using gdb to open a linux kernel core file generated for x86_64
platform. But gdb is not analyzing the dumps properly. Its getting the
wrong symbol values. For example, following case prints two different values
for same symbol panic_timeout.
#gdb vmlinux
(gdb) p &panic_timeout
$1 = (int *) 0xffffffff808a1fa8
#gdb vmlinux vmcore
(gdb) p &panic_timeout
$1 = (int *) 0xffffffff008aaebf
First one is the right value. Why gdb is giving incorrect results while
opened with vmcore?
I am using GNU gdb Red Hat Linux (6.5-5.fc6rh).
This problem is not present in gdb 6.4. It works perfectly fine.
Note, this vmlinux file is of ET_DYN type. It has been compiled as an
executable and then an external program changes elf type to ET_DYN because
this is a fully relocatable executable and can be loaded at any physical
address.
Any idea, what's wrong.
vmlinux ELF header is as follows.
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x200000
Start of program headers: 64 (bytes into file)
Start of section headers: 61579848 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 5
Size of section headers: 64 (bytes)
Number of section headers: 51
Section header string table index: 48
vmcore ELF header and PT_LOAD headers are as follows.
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: CORE (Core file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 64 (bytes into file)
Start of section headers: 0 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 6
Size of section headers: 0 (bytes)
Number of section headers: 0
Section header string table index: 0
There are no sections in this file.
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
NOTE 0x0000000000000190 0x0000000000000000 0x0000000000000000
0x0000000000000b20 0x0000000000000b20 0
LOAD 0x0000000000000cb0 0xffffffff80200000 0x0000000000200000
0x0000000000742000 0x0000000000742000 RWE 0
LOAD 0x0000000000742cb0 0xffff810000000000 0x0000000000000000
0x00000000000a0000 0x00000000000a0000 RWE 0
LOAD 0x00000000007e2cb0 0xffff810000100000 0x0000000000100000
0x0000000000f00000 0x0000000000f00000 RWE 0
LOAD 0x00000000016e2cb0 0xffff810009000000 0x0000000009000000
0x00000000c6f8dc80 0x00000000c6f8dc80 RWE 0
LOAD 0x00000000c8670930 0xffff810100000000 0x0000000100000000
0x0000000130000000 0x0000000130000000 RWE 0
Thanks
Vivek
next reply other threads:[~2007-05-01 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 10:42 Vivek Goyal [this message]
2007-06-03 9:35 ` Bernhard Walle
2007-06-03 16:37 ` Bernhard Walle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070501104231.GA5204@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=ak@suse.de \
--cc=ebiederm@xmission.com \
--cc=gdb@sourceware.org \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox