[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070529164442.0f272b74.akpm@linux-foundation.org>
Date: Tue, 29 May 2007 16:44:42 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Pekka J Enberg <penberg@...helsinki.fi>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Documentation: How to use GDB to decode OOPSes
On Mon, 28 May 2007 10:46:18 +0300 (EEST)
Pekka J Enberg <penberg@...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 ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists