Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753745Ab0ALDCr (ORCPT ); Mon, 11 Jan 2010 22:02:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752770Ab0ALDCp (ORCPT ); Mon, 11 Jan 2010 22:02:45 -0500 Received: from mail-iw0-f197.google.com ([209.85.223.197]:59526 "EHLO mail-iw0-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691Ab0ALDCm convert rfc822-to-8bit (ORCPT ); Mon, 11 Jan 2010 22:02:42 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=AvgX/sl2M4f5W2cc4lya/KlFRCkacrcORiSjCTmiyMJqXB3n64gmMKXiK/pud4PpGb HPEvLcQZ+DkYtfcUG9UeTS/FIecsQ7cWVcR48/62svhvJDRMbz7m1ZT/vpnGIbWSHWJL Pb3a3alwyhYDSyxELKQHiwb4nNVLmbUrf3MJ4= MIME-Version: 1.0 In-Reply-To: References: <4B448EE3.5060200@linux.intel.com> <4B45DBB5.9070904@linux.intel.com> From: Hui Zhu Date: Tue, 12 Jan 2010 11:02:22 +0800 Message-ID: Subject: Re: [PATCH] Fix markup_oops.pl get error in x86 To: Arjan van de Ven , Andrew Morton , Sam Ravnborg , =?ISO-8859-1?Q?Ozan_=C7aglayan?= , Matthew Wilcox Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1579 Lines: 46 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 CC: Andrew Morton CC: Arjan van de Ven CC: Sam Ravnborg CC: Ozan ?aglayan CC: Matthew Wilcox --- 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 () { 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; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/