From: Hui Zhu <teawater@gmail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>,
"Arjan van de Ven" <arjan@linux.intel.com>,
"Sam Ravnborg" <sam@ravnborg.org>,
"\"Ozan 锟�\x7f�\x7fglayan\"" <ozan@pardus.org.tr>,
"Matthew Wilcox" <willy@linux.intel.com>,
linux-kernel@vger.kernel.org, teawater@gmail.com
Subject: [PATCH] Fix markup_oops.pl get $func_offset error in x8664
Date: Mon, 25 Jan 2010 22:27:52 +0800 [thread overview]
Message-ID: <4B5DAA68.4060300@gmail.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=GB2312, Size: 1605 bytes --]
When I use markup_oops.pl parse a x8664 oops, I got:
objdump: --start-address: bad number: NaN
No matching code found
This is because:
main::(./m.pl:228): open(FILE, "objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-address=$decodestop $filename |") || die "Cannot start objdump";
DB<3> p $decodestart
NaN
This NaN is get from:
main::(./m.pl:176): my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
DB<2> p $func_offset
0x175
There already a "0x" in $func_offset, another 0x make it to be NaN.
The $func_offset is from line:
if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
I make a patch to change "(0x[0-9a-f]+)\/0x[a-f0-9]/)" to "0x([0-9a-f]+)\/0x[a-f0-9]/)".
Thanks,
Hui
Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ozan ï¿\x7f\x7fglayan <ozan@pardus.org.tr>
Cc: Matthew Wilcox <willy@linux.intel.com>
---
scripts/markup_oops.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -158,7 +158,7 @@ while (<STDIN>) {
$function = $1;
$func_offset = $2;
}
- if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+ if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
$function = $1;
$func_offset = $2;
}
next reply other threads:[~2010-01-25 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 14:27 Hui Zhu [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-01-17 13:35 [PATCH] Fix markup_oops.pl get $func_offset error in x8664 Hui Zhu
2010-01-23 1:21 ` Andrew Morton
2010-01-25 6:14 ` Hui Zhu
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=4B5DAA68.4060300@gmail.com \
--to=teawater@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ozan@pardus.org.tr \
--cc=sam@ravnborg.org \
--cc=willy@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.