core dump调试

coredump调试方法:
1:生成coredump
修改/etc/profile
 
# generate coredump file
ulimit -c unlimited
mkdir -p /fhrootfs/coredump
echo "/fhrootfs/coredump/core-%e-%p-%t" > /proc/sys/kernel/core_pattern
 
 
2:拷贝coredump到虚拟机中,和应用程序在同一个目录
 
 
/opt/toolchains/uclibc-crosstools-gcc-4.4.2-1/usr/bin/mips-linux-uclibc-gdb AppManage core-AppManage-3449-26
 
 
3:在gdb中执行:
设置库路径
 
set solib-absolute-prefix -- Set an alternate system root
set solib-search-path -- Set the search path for loading non-absolute shared library symbol files
 
add-shared-symbol-files -- Load the symbols from shared objects in the dynamic linker's link map
add-symbol-file -- Load symbols from FILE
 
 
 
 
 
set solib-absolute-prefix  /root/smarthg_bcm/targets/HG320G/fs.install
set solib-search-path -- Set the search path for loading non-absolute shared library symbol files
 
add-shared-symbol-files -- Load the symbols from shared objects in the dynamic linker's link map
add-symbol-file -- Load symbols from FILE
 
 
4:执行
bt
 
where
 
 

没有评论: