dbx分析core文件

来源:互联网 发布:软件模块化设计案例 编辑:程序博客网 时间:2024/06/08 05:12

[aix1]:[/dsg/cxf/new_system/ds/bin/0130]$ dbx ../orpd core
Type 'help' for help.
[using memory image in core]
reading symbolic information ...warning: no source compiled with -g


Segmentation fault in olb_open_seq at 0x10096f40 ($t2)
0x10096f40 (olb_open_seq+0x3e0) 817d0590         lwz   r11,0x590(r29)
(dbx) thread
 thread  state-k     wchan    state-u    k-tid   mode held scope function
 $t1     run                  running   778377     u   no   sys  _p_nsleep        
>$t2     run                  running  1003829     k   no   sys  olb_open_seq     
 $t3     run                  running   323663     u   no   sys  naccept          
 $t4     run                  running   794841     u   no   sys  _p_nsleep        
 $t5     run                  terminated  565345     u   no   sys  _p_nsleep        
(dbx) thread current 2
(dbx) where
olb_open_seq() at 0x10096f40
olb_load_switched() at 0x10095e74
olb_load() at 0x100965dc
olt_capture_redo() at 0x100825b4
olt_service_capture() at 0x10011c8c
olt_loop_single_thread() at 0x10011538
olt_loop() at 0x10012824
olt_instance_loop() at 0x100111a4
(dbx)

[aix1]:[/dsg/cxf/frequent_ddl/ds]$ dbx  bin/vagentd core
Type 'help' for help.
[using memory image in core]
reading symbolic information ...

Segmentation fault in btab_tab_drop_subpart_col at 0x101ee618 ($t4)
0x101ee618 (btab_tab_drop_subpart_col+0x90) 90a4fffc         stw   r5,-4(r4)
(dbx)

(dbx) registers
  $r0:0x00000004  $stkp:0x33ae0ea0   $toc:0x30144b98    $r3:0x00000001 
  $r4:0x00000004    $r5:0xffffffff    $r6:0x0000f032    $r7:0x00000000 
  $r8:0x102d417b    $r9:0x102d417b   $r10:0x00000000   $r11:0x00000000 
 $r12:0x101eecec   $r13:0x00000000   $r14:0x00000005   $r15:0x39b1d3d7 
 $r16:0x39b2daed   $r17:0x00000000   $r18:0x00000004   $r19:0x30115188 
 $r20:0x3053d760   $r21:0x39b2daed   $r22:0x000000ff   $r23:0x33ae2180 
 $r24:0x39b2dae9   $r25:0x352b0f18   $r26:0x00000000   $r27:0x33ae1034 
 $r28:0x39b1d3d7   $r29:0x300e4984   $r30:0x33ae0f90   $r31:0x33ae1350 
 $iar:0x101ee618   $msr:0x0000d032    $cr:0x44844224  $link:0x101eed08 
 $ctr:0xd04b8f00   $xer:0x00000001    $mq:0x00000000 
          Condition status = 0:g 1:g 2:l 3:g 4:g 5:e 6:e 7:g
        [unset $noflregs to view floating point registers]
        [unset $novregs to view vector registers]
in btab_tab_drop_subpart_col at 0x101ee618 ($t4)
0x101ee618 (btab_tab_drop_subpart_col+0x90) 90a4fffc         stw   r5,-4(r4)
(dbx) print $r5
0xffffffff
(dbx) print $r4
0x00000004
(dbx)

 

 

其中dbx用法:

dbx <program name> core

thread查看程序打开几个线程

>$t2  箭头标签告诉你程序问题出在什么地方

thread current 2查看线程2当时正在运行那些函数

where打印2线程具体运行那些函数,根据这些函数来确定程序的bug出在什么位置

原创粉丝点击