mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: "Arjan van de Ven" <arjan@linux.intel.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Ozan Çaglayan" <ozan@pardus.org.tr>,
	"Matthew Wilcox" <willy@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix markup_oops.pl get error in x86
Date: Tue, 12 Jan 2010 11:02:22 +0800	[thread overview]
Message-ID: <daef60381001111902q2d6c7c59p7aa935ae39c8febe@mail.gmail.com> (raw)
In-Reply-To: <daef60381001101859t43e336fr149e5a1a11c8f981@mail.gmail.com>

Sorry I forgot the Signed-off-by and CC in prev mail.

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 0x to 0x2.
Then this value will be set to NaN.
This patch will fix it.

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 Çaglayan <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
@@ -154,7 +154,7 @@ while (<STDIN>) {
 	if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
 		$target = $1;
 	}
-	if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
+	if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
 		$function = $1;
 		$func_offset = $2;
 	}

  reply	other threads:[~2010-01-12  3:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  9:23 Hui Zhu
2010-01-06 13:23 ` Arjan van de Ven
2010-01-07  5:43   ` Hui Zhu
2010-01-07 13:03     ` Arjan van de Ven
2010-01-11  2:59       ` Hui Zhu
2010-01-12  3:02         ` Hui Zhu [this message]
2010-01-06 13:45 ` Ozan Çağlayan

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=daef60381001111902q2d6c7c59p7aa935ae39c8febe@mail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®