From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: "Discussion list for crash utility usage\,
maintenance and development" <crash-utility@redhat.com>
Cc: GDB Development <gdb@sourceware.org>
Subject: Re: gdb on KDUMP files
Date: Fri, 17 Oct 2014 11:24:00 -0000 [thread overview]
Message-ID: <87d29rhrce.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <20141002102700.3eba84a5@suse.cz> (Petr Tesarik's message of "Thu, 2 Oct 2014 10:27:00 +0200")
Petr,
I'm copying the GDB mailing list, because this is probably of interest
to the GDB community as well.
On Thu, Oct 02 2014, Petr Tesarik wrote:
> On Thu, 2 Oct 2014 03:18:55 +0000
> Pete Delaney <pdelaney@silver-peak.com> wrote:
>
>> Hi:
>>
>> Six years ago Dave and I were discussing using gdb on KDUMP files:
>>[...]
>>
>> Anyone know what's going on?
>
> [...]
>
> I'm glad you're interested in using GDB to read kernel dump files,
> especially if you're willing to make it work for real. I have proposed
> more than once that the crash utility be re-implemented in pure gdb.
Incidentally, I've tossed this idea around as well. Do you have a
pointer to one of these proposals (and discussions, if any)?
> Last time I looked (approx. 1.5 years ago) the main missing pieces were:
>
> 1. Use of physical addresses (described above)
I guess this includes the capability to translate virtual to physical
addresses, using the kernel's page tables?
> 2. Support for multiple virtual address spaces (for different process
> contexts)
One way of dealing with this might be to represent the different virtual
address spaces as multiple inferiors.
> 3. Ability to read compressed kdump files
> 4. Ability to use 64-bit files on 32-bit platforms (to handle PAE)
In addition, there might be:
5. Support kernel modules and represent them as "shared objects".
6. Understand the kernel's task structures. Represent multiple tasks
within the same "inferior" as threads in GDB.
7. Format functions: Extract information from kernel data structures
and show it in a digested, more readable, form. Perhaps such
functions can be implemented as Python scripts.
Among others, I'd envision the following GDB commands:
file <vmlinux> Specify vmlinux Elf image
target kdump <kdump-file> Load kdump
info sharedlibrary List kernel modules
info inferiors List address spaces ("processes")
inferior <id> Switch to certain address space
info threads List threads in current address space
bt, up, down, frame <id> Usual behavior
generate-core-file Write core dump for the current inferior
linux cmdline Show kernel command line
linux kmesg Show kernel message buffer
linux cpuinfo List CPUs and their state
linux ... Other format functions
All of this together may not be a small task, and there are still
various open questions, e.g. how to deal with interrupt contexts. But I
think we could already provide useful functionality with a smaller
initial development stage and defer features like multiple address space
support, PAE support, format functions, etc., to a later stage.
--
Andreas
next parent reply other threads:[~2014-10-17 11:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b3a5a177772a47e8bf740e3422befa6a@BY2PR04MB173.namprd04.prod.outlook.com>
[not found] ` <20141002102700.3eba84a5@suse.cz>
2014-10-17 11:24 ` Andreas Arnez [this message]
2014-10-17 11:55 ` Jan Kratochvil
[not found] ` <ffc61e9ab6e7423eb7919f0e0828266d@BY2PR04MB173.namprd04.prod.outlook.com>
2014-10-21 5:53 ` Jan Kratochvil
2014-10-22 0:54 ` Pete Delaney
2014-10-24 0:34 ` Doug Evans
2014-10-30 10:14 ` Pedro Alves
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=87d29rhrce.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=crash-utility@redhat.com \
--cc=gdb@sourceware.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