[Crash-utility] debug 3th part module which oops the system

Han Pingtian hanpt at linux.vnet.ibm.com
Wed Jul 10 05:22:00 UTC 2013


On Tue, Jul 09, 2013 at 08:40:23AM -0400, Dave Anderson wrote:
> 
> 
> ----- Original Message -----
> 
> > >  crash> dis -r d0000000046f0060
> > >  0xd0000000046f0034 <.init_module>:      mflr    r0
> > >  0xd0000000046f0038 <.init_module+4>:    std     r30,-16(r1)
> > >  0xd0000000046f003c <.init_module+8>:    ld      r30,-32768(r2)
> > >  0xd0000000046f0040 <.init_module+12>:   std     r0,16(r1)
> > >  0xd0000000046f0044 <.init_module+16>:   stdu    r1,-128(r1)
> > >  0xd0000000046f0048 <.init_module+20>:   ld      r3,-32760(r30)
> > >  0xd0000000046f004c <.init_module+24>:   bl      0xd0000000046f0078
> > >  0xd0000000046f0050 <.init_module+28>:   ld      r2,40(r1)
> > >  0xd0000000046f0054 <.init_module+32>:   li      r9,0
> > >  0xd0000000046f0058 <.init_module+36>:   addi    r1,r1,128
> > >  0xd0000000046f005c <.init_module+40>:   li      r3,0
> > >  0xd0000000046f0060 <.init_module+44>:   stw     r9,0(r9)
> > >  crash>
> > > 
> > > Dave
> > > 
> > Thanks, Dave. But how could we let the 'dis -l' working here, please?
> > 
> > crash> dis -l .my_oops_init 20
> > 0xd000000001460034 <.init_module>:      mflr    r0
> > 0xd000000001460038 <.init_module+4>:    std     r30,-16(r1)
> > 0xd00000000146003c <.init_module+8>:    ld      r30,-32768(r2)
> > 0xd000000001460040 <.init_module+12>:   std     r0,16(r1)
> > 0xd000000001460044 <.init_module+16>:   stdu    r1,-128(r1)
> > 0xd000000001460048 <.init_module+20>:   ld      r3,-32760(r30)
> > 0xd00000000146004c <.init_module+24>:   bl      0xd000000001460078
> > 0xd000000001460050 <.init_module+28>:   ld      r2,40(r1)
> > 0xd000000001460054 <.init_module+32>:   li      r9,0
> > 0xd000000001460058 <.init_module+36>:   addi    r1,r1,128
> > 0xd00000000146005c <.init_module+40>:   li      r3,0
> > 0xd000000001460060 <.init_module+44>:   stw     r9,0(r9)
> > 0xd000000001460064 <.init_module+48>:   ld      r0,16(r1)
> > 0xd000000001460068 <.init_module+52>:   ld      r30,-16(r1)
> > 0xd00000000146006c <.init_module+56>:   mtlr    r0
> > 0xd000000001460070 <.init_module+60>:   blr
> > 0xd000000001460074 <.init_module+64>:   .long 0x0
> > 0xd000000001460078 <.init_module+68>:   addis   r12,r2,-1
> > 0xd00000000146007c <.init_module+72>:   addi    r12,r12,14152
> > 0xd000000001460080 <.init_module+76>:   std     r2,40(r1)
> > crash>
> 
> cI don't know.  Line numbers do appear to work for the "normal" modules.
> 
> Dave

I just found that if I remove the '__init':


//static int __init my_oops_init(void) {
static int my_oops_init(void) {
    printk("oops from the module\n");
    create_oops();
    return (0);
}

then source code can be list:

crash> dis -l D00000000147002C
/home/hpt/oops/oops.c: 6
0xd00000000147002c <.init_module+44>:   stw     r9,0(r9)
crash>





More information about the Crash-utility mailing list