linux/scripts
Hui Zhu 0139f1d953 markup_oops.pl: fix for faulting instruction in the first line of a range
I got a "No matching code found" when I use markup_oops.pl parse a error
in a x86_64 module.

cat e.c

int init_module(void)
{
	char	*buf = 0;

	buf[0] = 3;

	return 0;
}

void cleanup_module(void)
{
	//char	*buf = 0;

	//buf[0] = 3;
}

MODULE_AUTHOR("Hui Zhu");
MODULE_LICENSE("GPL");

0000000000000000 <init_module>:
init_module():
/home/teawater/study/kernel/stack2core/example/e.c:10
   0:	c6 04 25 00 00 00 00 	movb   $0x3,0x0
   7:	03
/home/teawater/study/kernel/stack2core/example/e.c:13
   8:	31 c0                	xor    %eax,%eax
   a:	c3                   	retq
   b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

0000000000000010 <cleanup_module>:
cleanup_module():
/home/teawater/study/kernel/stack2core/example/e.c:20
  10:	f3 c3                	repz retq
  12:	90                   	nop
  13:	90                   	nop
Disassembly of section .modinfo:

This is because the faulting instruction "movb   $0x3,0x0" is the first
line of the range.

In the markup_oops.pl:
main::(./scripts/markup_oops.pl:245):
245:				if (InRange($1, $target)) {
  DB<2> p $line
ffffffffa001b000:	c6 04 25 00 00 00 00 	movb   $0x3,0x0
  DB<3> p $counter
0

It just set $center in next loop. So it cannot get the $center.

And even if $center is set to the right value 0.
if ($center == 0) {
	print "No matching code found \n";
	exit;
}
The first line $center will be 0, so I change the default value to -1.

Signed-off-by: Hui Zhu <teawater@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-02 14:33:56 +01:00
..
basic kbuild: move autoconf.h to include/generated 2009-12-12 13:08:15 +01:00
dtc dtc: Mark various internal functions static 2009-11-15 15:01:41 -08:00
genksyms genksyms: close ref_file after use 2010-02-02 14:33:55 +01:00
kconfig Improve kconfig symbol hashing 2010-02-02 14:33:55 +01:00
ksymoops
mod modpost: fix segfault in sym_is() with prefixed arches 2010-01-17 11:00:53 -08:00
package scripts/package: deb-pkg: use fakeroot if available 2009-12-12 13:08:16 +01:00
rt-tester scripts: change scripts to use system python instead of env 2010-02-02 14:33:56 +01:00
selinux SELinux: header generation may hit infinite loop 2009-11-23 09:00:44 +11:00
tracing tracing, perf: Convert the power tracer into an event tracer 2009-09-19 11:42:12 +02:00
.gitignore gitignore: ignore scripts/ihex2fw 2009-06-27 00:17:48 +02:00
bin2c.c
binoffset.c
bloat-o-meter
bootgraph.pl bootgraph: fix for use with dot symbols 2009-02-15 12:50:08 +01:00
checkincludes.pl checkincludes.pl: add option to remove duplicates in place 2009-09-20 12:27:43 +02:00
checkkconfigsymbols.sh kbuild,scripts: use non-builtin echo for '-e' 2009-10-11 23:21:25 +02:00
checkpatch.pl remove my email address from checkpatch. 2010-01-12 20:56:52 -08:00
checkstack.pl
checksyscalls.sh asm-generic: add a generic unistd.h 2009-06-11 21:02:16 +02:00
checkversion.pl
cleanfile
cleanpatch
config kbuild: add generic --set-str option to scripts/config 2009-06-14 22:48:08 +02:00
conmakehash.c Fix all -Wmissing-prototypes warnings in x86 defconfig 2009-09-23 07:39:28 -07:00
decodecode scripts: add ARM support to decodecode 2010-02-02 14:33:54 +01:00
diffconfig
export_report.pl
extract-ikconfig kconfig: have extract-ikconfig read ELF files 2009-08-18 22:00:18 -04:00
gcc-version.sh Remove bashisms from scripts 2009-06-09 22:37:54 +02:00
gcc-x86_32-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gcc-x86_64-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gen_initramfs_list.sh kbuild: fix spurious initramfs rebuild 2009-04-11 08:18:12 +02:00
get_maintainer.pl scripts/get_maintainer.pl: fix file exclusion X: logic 2010-01-11 09:34:05 -08:00
gfp-translate mm: add a gfp-translate script to help understand page allocation failure reports 2009-06-16 19:47:44 -07:00
headerdep.pl kbuild: fix option processing for -I in headerdep 2009-04-11 08:18:07 +02:00
headers_check.pl kbuild/headers_check: refine extern check 2009-06-09 22:37:56 +02:00
headers_install.pl warn about use of uninstalled kernel headers 2009-10-11 23:21:25 +02:00
headers.sh kbuild: do not check for include/asm-$ARCH 2009-12-12 13:08:14 +01:00
kallsyms.c scripts/kallsyms: suppress build warning 2010-02-02 14:33:56 +01:00
Kbuild.include kbuild: generate modules.builtin 2009-12-12 13:08:16 +01:00
kernel-doc tracing: Add DEFINE_EVENT(), DEFINE_SINGLE_EVENT() support to docbook 2009-12-02 09:57:37 +01:00
Lindent
Makefile sparc: Kill PROM console driver. 2009-09-15 17:04:38 -07:00
Makefile.build kbuild: Fix linking error built-in.o no such file or directory 2010-02-02 14:33:54 +01:00
Makefile.clean
Makefile.fwinst
Makefile.headersinst kbuild: fix "Argument list too long" error for "make headers_check", 2009-06-09 22:37:56 +02:00
Makefile.host
Makefile.lib kbuild: really fix bzImage build with non-bash sh 2010-01-13 13:27:24 +01:00
Makefile.modbuiltin kbuild: generate modules.builtin 2009-12-12 13:08:16 +01:00
Makefile.modinst Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
Makefile.modpost tracing: Remove markers 2009-09-18 21:22:08 +02:00
makelst
markup_oops.pl markup_oops.pl: fix for faulting instruction in the first line of a range 2010-02-02 14:33:56 +01:00
mkcompile_h scripts/mkcompile_h: don't test for hardcoded paths 2010-02-02 14:33:56 +01:00
mkmakefile
mksysmap Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
mkuboot.sh
mkversion
module-common.lds linker script: throw away .discard section 2009-06-24 15:13:38 +09:00
namespace.pl
patch-kernel
pnmtologo.c fbdev: work around old compiler bug 2009-06-30 18:55:59 -07:00
profile2linkerlist.pl
recordmcount.pl tracing/x86: Derive arch from bits argument in recordmcount.pl 2010-01-11 23:49:35 -05:00
setlocalversion kbuild: fix delay in setlocalversion on readonly source 2009-06-14 22:26:00 +02:00
show_delta scripts: change scripts to use system python instead of env 2010-02-02 14:33:56 +01:00
tags.sh kbuild: specify absolute paths for cscope 2009-12-12 13:08:16 +01:00
unifdef.c unifdef: update to upstream revision 1.190 2009-12-12 13:08:16 +01:00
ver_linux Remove bashisms from scripts 2009-06-09 22:37:54 +02:00