Instruction dump? - Linux

This is a discussion on Instruction dump? - Linux ; Can someone please explain the contents of the instruction dump in an a Linux OOPS, or have a reference which does so? How does one go about using it in debugging? For instance, I have the following instruction dump: Instruction ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Instruction dump?

  1. Instruction dump?

    Can someone please explain the contents of the instruction dump in an
    a Linux OOPS, or have a reference which does so? How does one go
    about using it in debugging? For instance, I have the following
    instruction dump:

    Instruction dump:
    7F850000 41BEFF7C 3860FFFF 4BFFFF78 9421FFE0 7C0802A6 BF61000C
    7C9E2379
    7C7C1B78 90010024 41820188 83BE034C <801D0034> 70090008 40820014
    2F83001F

    What can I do with this information? I am running Linux 2.6.26 on a
    powerpc.

  2. Re: Instruction dump?

    On Sep 16, 11:45 am, Bill wrote:
    > Can someone please explain the contents of the instruction dump in an
    > a Linux OOPS, or have a reference which does so? How does one go
    > about using it in debugging? For instance, I have the following
    > instruction dump:
    >
    > Instruction dump:
    > 7F850000 41BEFF7C 3860FFFF 4BFFFF78 9421FFE0 7C0802A6 BF61000C
    > 7C9E2379
    > 7C7C1B78 90010024 41820188 83BE034C <801D0034> 70090008 40820014
    > 2F83001F
    >
    > What can I do with this information? I am running Linux 2.6.26 on a
    > powerpc.


    Usually you get a stackdump and often some messages that will tell you
    what source file originated the code that was running at the time of
    the oops. If you get some addresses you can also manually convert
    that
    if you have the kernel symbols file for the kernel that crashed.
    Generally try to figure out what went wrong.
    Consider instrumenting suspect kernel code with additional printk's.
    Also do web searches and see if
    maybe the problem you found is known.

    Oh, and is it repeatable? How long and or how complicated external
    conditions does it take to cause?

  3. Re: Instruction dump?

    Bill writes:

    > Can someone please explain the contents of the instruction dump in an
    > a Linux OOPS, or have a reference which does so?


    Use the source Luke.

    Specifically, show_instructions in arch/ppc64/kernel/process.c may
    be a good start.

    > How does one go about using it in debugging?


    One becomes a kernel hacker

    > For instance, I have the following
    > instruction dump:
    >
    > Instruction dump:
    > 7F850000 41BEFF7C 3860FFFF 4BFFFF78 9421FFE0 7C0802A6 BF61000C
    > 7C9E2379
    > 7C7C1B78 90010024 41820188 83BE034C <801D0034> 70090008 40820014
    > 2F83001F
    >
    > What can I do with this information?


    Write it to an assembly file, like this:

    .long 0x7F850000,0x41BEFF7C,0x3860FFFF,0x4BFFFF78,...

    Compile and disasseble the result:

    0: 7f 85 00 00 cmpw cr7,r5,r0
    4: 41 be ff 7c beq- cr7,0xffffffffffffff80
    8: 38 60 ff ff li r3,-1
    c: 4b ff ff 78 b 0xffffffffffffff84
    10: 94 21 ff e0 stwu r1,-32(r1)
    14: 7c 08 02 a6 mflr r0
    18: bf 61 00 0c stmw r27,12(r1)
    1c: 7c 9e 23 79 mr. r30,r4
    20: 7c 7c 1b 78 mr r28,r3
    24: 90 01 00 24 stw r0,36(r1)
    28: 41 82 01 88 beq- 0x1b0
    2c: 83 be 03 4c lwz r29,844(r30)
    30: 80 1d 00 34 lwz r0,52(r29) <<- crash here
    34: 70 09 00 08 andi. r9,r0,8
    38: 40 82 00 14 bne- 0x4c
    3c: 2f 83 00 1f cmpwi cr7,r3,31

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  4. Re: Instruction dump?

    Bill wrote:
    >
    >Can someone please explain the contents of the instruction dump in an
    >a Linux OOPS, or have a reference which does so? How does one go
    >about using it in debugging? For instance, I have the following
    >instruction dump:
    >
    >Instruction dump:
    >7F850000 41BEFF7C 3860FFFF 4BFFFF78 9421FFE0 7C0802A6 BF61000C
    >7C9E2379
    >7C7C1B78 90010024 41820188 83BE034C <801D0034> 70090008 40820014
    >2F83001F
    >
    >What can I do with this information? I am running Linux 2.6.26 on a
    >powerpc.


    You need a PowerPC disassembler. I assume there must be one that can
    disassemble raw dwords like this. You could use objdump or gdb, with some
    trickery.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

+ Reply to Thread