lkml.org 
[lkml]   [2010]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH] Fix markup_oops.pl get error in x86
On Wed, Jan 6, 2010 at 21:23, Arjan van de Ven <arjan@linux.intel.com> wrote:
> On 1/6/2010 1:23, Hui Zhu wrote:
>>
>>        }
>> $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 make a small patch to fix it.
>
>> -       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]+)\/[a-f0-9]/) {
>
> I think this makes sense, but would you not also need to add "x" to the list
> of allowed characters?
> so   [a-f0-9x]
> ?
>
>

Ah, sorry I make a mistake. I think the last 0x need be keep.

What about this version?

Thanks,
Hui

---
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;
}
--
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/
\
 
 \ /
  Last update: 2010-01-07 06:45    [W:0.067 / U:8.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site