aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2010-01-15 20:01:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-16 15:15:37 -0500
commit1f8cdae43929d32e3706c314eb2a302dc3683fba (patch)
treecc99ca58e77d383dec6c78e034fdb30ee3e6d73a
parent97922b5462fa543484831d42ab0fe4562b9373fc (diff)
markup_oops.pl: fix error with x86
When I try to use markup_oops.pl in x86, I always get: cat 1 | perl markup_oops.pl ./vmlinux objdump: --start-address: bad number: NaN No matching code found This is because in line: if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/[a-f0-9]/) { $function = $1; $func_offset = $2; } $func_offset will get a number like "0x2" But in follow code: my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset"); It add other ox to ox2. Then this value will be set to NaN. So I made a small patch to fix it. Signed-off-by: Hui Zhu <teawater@gmail.com> Acked-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>
-rw-r--r--scripts/markup_oops.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 5f0fcb712e29..ce3e40b01e48 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -154,7 +154,7 @@ while (<STDIN>) {
154 if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) { 154 if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
155 $target = $1; 155 $target = $1;
156 } 156 }
157 if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { 157 if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
158 $function = $1; 158 $function = $1;
159 $func_offset = $2; 159 $func_offset = $2;
160 } 160 }