lkml.org 
[lkml]   [2010]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH] Fix markup_oops.pl get error in x86
    Hello,

    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 make a small patch to fix it.

    Best regards,
    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]+)\/[a-f0-9]/) {
    $function = $1;
    $func_offset = $2;
    }

    \
     
     \ /
      Last update: 2010-01-06 10:27    [W:5.876 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site