mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation: How to use GDB to decode OOPSes
Date: Tue, 29 May 2007 16:44:42 -0700	[thread overview]
Message-ID: <20070529164442.0f272b74.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0705281046001.30697@sbz-30.cs.Helsinki.FI>

On Mon, 28 May 2007 10:46:18 +0300 (EEST)
Pekka J Enberg <penberg@cs.helsinki.fi> wrote:

> +In addition, you can use GDB to figure out the exact file and line
> +number of the OOPS from the vmlinux file. If you have
> +CONFIG_DEBUG_INFO enabled, you can simply copy the EIP value from the
> +OOPS:
> +
> + EIP:    0060:[<c021e50e>]    Not tainted VLI
> +
> +And use GDB to translate that to human-readable form:
> +
> +  gdb vmlinux
> +  (gdb) l *0xc021e50e
> +
> +If you don't have CONFIG_DEBUG_INFO enabled, you use the function
> +offset from the OOPS:
> +
> + EIP is at vt_ioctl+0xda8/0x1482
> +
> +And recompile the kernel with CONFIG_DEBUG_INFO enabled:
> +
> +  make vmlinux
> +  gdb vmlinux
> +  (gdb) p vt_ioctl
> +  (gdb) l *(0x<address of vt_ioctl> + 0xda8)
> +

yeah.  Often this process will tell you that the oops was in
spin_lock_irq() or list_add() or something useless like that.

So the next step is to start adding and subtracting 4, 8, 12, ...
to the EIP value until you "fall out" of the inlined function and 
back into the callee.

But I'm not sure that I'd want to have to describe that process
(especially the means by which one determines that it is necessary)
to normal people ;)

      reply	other threads:[~2007-05-29 23:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-28  7:46 Pekka J Enberg
2007-05-29 23:44 ` Andrew Morton [this message]

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=20070529164442.0f272b74.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    /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

Powered by JetHome