linux/scripts
Arjan van de Ven 5aea50b5c7 scripts: script from kerneloops.org to pretty print oops dumps
We're struggling all the time to figure out where the code came from that
oopsed..  The script below (a adaption from a script used by
kerneloops.org) can help developers quite a bit, at least for non-module
cases.

It works and looks like this:

[/home/arjan/linux]$ dmesg | perl scripts/markup_oops.pl vmlinux
 {
 	struct agp_memory *memory;

 	memory = agp_allocate_memory(agp_bridge, pg_count, type);
 c055c10f:	89 c2                	mov    %eax,%edx
 	if (memory == NULL)
 c055c111:	74 19                	je     c055c12c <agp_allocate_memory_wrap+0x30>
 /* This function must only be called when current_controller != NULL */
 static void agp_insert_into_pool(struct agp_memory * temp)
 {
 	struct agp_memory *prev;

 	prev = agp_fe.current_controller->pool;
 c055c113:	a1 ec dc 8f c0       	mov    0xc08fdcec,%eax
*c055c118:	8b 40 10             	mov    0x10(%eax),%eax     <----- faulting instruction

 	if (prev != NULL) {
 c055c11b:	85 c0                	test   %eax,%eax
 c055c11d:	74 05                	je     c055c124 <agp_allocate_memory_wrap+0x28>
 		prev->prev = temp;
 c055c11f:	89 50 04             	mov    %edx,0x4(%eax)
 		temp->next = prev;
 c055c122:	89 02                	mov    %eax,(%edx)
 	}
 	agp_fe.current_controller->pool = temp;
 c055c124:	a1 ec dc 8f c0       	mov    0xc08fdcec,%eax
 c055c129:	89 50 10             	mov    %edx,0x10(%eax)
 	if (memory == NULL)
 		return NULL;

 	agp_insert_into_pool(memory);

so in this case, we faulted while dereferencing agp_fe.current_controller
pointer, and we get to see exactly which function and line it affects...
Personally I find this very useful, and I can see value for having this
script in the kernel for more-than-just-me to use.

Caveats:
* It only works for oopses not-in-modules
* It only works nicely for kernels compiled with CONFIG_DEBUG_INFO
* It's not very fast.
* It only works on x86

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:12 -08:00
..
basic Update .gitignore files for generated targets 2008-10-20 11:24:31 -07:00
genksyms allow stripping of generated symbols under CONFIG_KALLSYMS_ALL 2008-12-19 22:47:10 +01:00
kconfig kconfig: improve error messages for bad source statements 2009-01-02 20:43:22 +01:00
ksymoops
mod kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module 2008-10-29 22:02:10 +01:00
package kbuild: remove TAR_IGNORE 2008-12-05 19:50:36 +01:00
rt-tester
selinux
trace tracing: add "power-tracer": C/P state tracer to help power optimization 2008-11-26 08:29:32 +01:00
tracing ftrace: add a script to produce a hierarchical view of a function trace 2008-10-27 11:00:07 +01:00
.gitignore
bin2c.c
binoffset.c
bloat-o-meter
bootgraph.pl tracing/fastboot: put error message on stderr 2008-11-13 19:58:22 +01:00
checkincludes.pl
checkkconfigsymbols.sh
checkpatch.pl Update email addresses. 2008-10-20 12:50:03 -07:00
checkstack.pl sparc: Add checkstack support 2008-10-22 21:53:49 -07:00
checksyscalls.sh scripts/checksyscalls.sh: fix for non-gnu sed 2008-10-29 22:02:08 +01:00
checkversion.pl
cleanfile
cleanpatch
conmakehash.c
decodecode scripts: improve the decodecode script 2008-12-03 22:36:39 +01:00
diffconfig
export_report.pl
extract-ikconfig remove bashisms from scripts/extract-ikconfig 2008-12-03 21:32:02 +01:00
gcc-version.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh
headerdep.pl kbuild: add headerdep used to detect inclusion cycles in header files 2008-12-18 20:18:04 +01:00
headers_check.pl kbuild: ignore a few files in headers_check 2009-01-02 20:43:27 +01:00
headers_install.pl kbuild: in headers_install autoconvert asm/inline/volatile to __xxx__ 2009-01-02 20:43:24 +01:00
headers.sh
kallsyms.c allow stripping of generated symbols under CONFIG_KALLSYMS_ALL 2008-12-19 22:47:10 +01:00
Kbuild.include kbuild: use KECHO convenience echo 2008-12-03 21:32:01 +01:00
kernel-doc kernel-doc: check for extra kernel-doc notations 2008-12-19 18:27:19 +01:00
Lindent
Makefile
Makefile.build Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next 2008-12-28 15:13:48 -08:00
Makefile.clean
Makefile.fwinst
Makefile.headersinst
Makefile.host
Makefile.lib kbuild: expand -I in KBUILD_CPPFLAGS 2008-12-03 21:31:59 +01:00
Makefile.modinst kbuild: strip generated symbols from *.ko 2008-12-19 22:41:15 +01:00
Makefile.modpost kbuild: fix KBUILD_EXTRA_SYMBOLS 2008-10-29 22:02:09 +01:00
makelst
markup_oops.pl scripts: script from kerneloops.org to pretty print oops dumps 2009-01-06 15:59:12 -08:00
mkcompile_h kbuild: kill output in silent mode of mkcompile_h 2008-12-03 21:32:00 +01:00
mkmakefile kbuild: teach mkmakfile to be silent 2008-12-03 21:32:02 +01:00
mksysmap kbuild: strip generated symbols from *.ko 2008-12-19 22:41:15 +01:00
mkuboot.sh
mkversion
namespace.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
recordmcount.pl tracing/function-graph-tracer: add a new .irqentry.text section 2008-12-12 11:14:07 +01:00
setlocalversion setlocalversion: add git-svn support 2008-12-03 22:58:30 +01:00
show_delta
strip-symbols kbuild: strip generated symbols from *.ko 2008-12-19 22:41:15 +01:00
tags.sh kbuild: drop debugging leftover in tags.sh 2009-01-02 20:43:26 +01:00
unifdef.c
ver_linux