gdb调试core文件,where信息不详细

1、问题描述,where信息显示不详细,只能看到具体哪个函数错了,但详细的信息看不出来,且list命令显示的代码也完全对不上

Program terminated with signal 11, Segmentation fault.
#0  0x00007f08c919797e in *******::*******(long, int&) () from /home/lib/lib****.so
(gdb) where
#0  0x00007f08c919797e in ******::*****(long, int&) () from /home/lib/lib***.so
#1  0x00007f08c9199642 in *****::****() () from /home/lib/lib****.so

。。。。
#7  0x000000000040869b in main ()


2、查资料说需要加-g选项编译

使用-g选项编译,可以产生带有调试信息的目标代码,以便能够在core文件中包含调试信息,方便gdb跟踪至源代码行

Program terminated with signal 6, Aborted.
#0  0x00007f119a8c05d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) where
#0  0x00007f119a8c05d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f119a8c1cc8 in __GI_abort () at abort.c:90
#2  0x00007f119a900e07 in __libc_message (do_abort=do_abort@entry=2, 
    fmt=fmt@entry=0x7f119aa098c8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
#3  0x00007f119a906c67 in malloc_printerr (action=, str=0x7f119aa06fb7 "corrupted double-linked list", 
    ptr=) at malloc.c:4972
#4  0x00007f119a90828a in _int_free (av=0x7f119ac45760 , p=0x128ec50, have_lock=0) at malloc.c:3960
#5  0x000000000040ee12 in ***() ()
#6  0x000000000040f09d in main ()


你可能感兴趣的:(gdb调试core文件,where信息不详细)