日期:2014-05-16  浏览次数:20644 次

问了很多老手不懂,各位高手请进,GDB调试问题。
[root@localhost hmc]# mipsel-linux-gdb main.out core-main.out-442-933 
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=mipsel-linux-uclibc".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/905291/ReleaseBR_hmc_N8808_chengdu_101021/platform/integration/hmc/main.out...done.
[New Thread 481]
[New Thread 443]
[New Thread 450]
[New Thread 451]
[New Thread 445]
[New Thread 474]
[New Thread 444]
[New Thread 453]
[New Thread 460]
[New Thread 480]
[New Thread 482]
[New Thread 446]
[New Thread 452]
[New Thread 457]
[New Thread 461]
[New Thread 462]
[New Thread 463]
[New Thread 464]
[New Thread 468]
[New Thread 469]
[New Thread 471]
[New Thread 472]
[New Thread 476]
[New Thread 477]
[New Thread 478]
[New Thread 479]
[New Thread 449]
[New Thread 456]
[New Thread 465]
[New Thread 470]
[New Thread 475]
[New Thread 442]
[New Thread 455]
[New Thread 466]
[New Thread 473]
[New Thread 454]
[New Thread 467]
Core was generated by `./main.out'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x00000000 in ?? ()
(gdb) disassemble
No function contains program counter for selected frame.
(gdb)

------解决方案--------------------
应该是你程序里的数据操作把堆栈都破坏掉了,所以bt看不到什么东西了。
sig11一般就是内存操作的问题,检查下吧
------解决方案--------------------
11) SIGSEGV
------解决方案--------------------
不贴代码,你打算问什么呢?
------解决方案--------------------
开了几十个线程后内方访问越界挂掉。

通常多进程和多线程的程序很难调试,建议改为单进程、单线程测试。

如果这些线程的功能都是相似的,先采用单线程测试,看看内存访问越界的原因。