gdb 调试2

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220400224 (LWP 25455)]
0x080d3589 in ethoam_trace_stat_passCheck (type=ethoam_pm_test_mode_slm, interval=ethoam_pm_bin_interval_15min, pm_index=0x28)
    at ../src/ethoam_pm_trace.C:84
84        if (ethoam_trace_stat_filter.checkMep == ETHOAM_TRUE &&

Program received signal SIGSEGV, Segmentation fault.(程序收到信号SIGSEGV分段故障

SIGSEGV:在POSIX兼容的平台上,SIGSEGV是当一个进程执行了一个无效的内存引用,或发生段错误时发送给它的信号。SIGSEGV的符号常量在头文件signal.h中定义。

 

use the gdb find the invaid memory access.
(gdb) info stack
#0  0x080d3589 in ethoam_trace_stat_passCheck (type=ethoam_pm_test_mode_slm, interval=ethoam_pm_bin_interval_15min, pm_index=0x28)
    at ../src/ethoam_pm_trace.C:84
#1  0x080d0e10 in ethoam_slm_primitve_produceEvent (slm_stat=0x86ba32c, slm_primitive=0xb7421d20) at ../src/ethoam_pm_stat.C:1207
#2  0x080d06d4 in ethoam_slm_primitve_process (pm_index=0xb742186c, slm_primitive=0xb7421d20) at ../src/ethoam_pm_stat.C:967
#3  0x080d2dfe in ethoam_slm_block_process (instance=0) at ../src/ethoam_pm_stat.C:1848
#4  0x080d2f73 in ethoam_pm_block_process (instance=0) at ../src/ethoam_pm_stat.C:1908
#5  0x080beea8 in ethoam_pm_statTaskEntry () at ../src/ethoam_pm.C:166
#6  0x0087e3cc in start_thread () from /lib/tls/libpthread.so.0
#7  0x006f5c3e in clone () from /lib/tls/libc.so.6

(gdb) x 0x28
0x28:   Cannot access memory at address 0x28

OK,find the root cause.

你可能感兴趣的:(gdb 调试2)