Eclipse CDT中的GDB崩溃:“GDB';中的错误:”free():下一个大小无效(快速):

Eclipse CDT中的GDB崩溃:“GDB';中的错误:”free():下一个大小无效(快速):,c,eclipse,debugging,gdb,eclipse-cdt,C,Eclipse,Debugging,Gdb,Eclipse Cdt,如果我在Eclipse中启动调试器来调试我的C程序,它会显示一个gdb错误并崩溃。我可以从命令行毫无问题地运行调试器。这是gdb内部的一个问题。Eclipse是否可以使用一些不稳定的gdb命令 GNU gdb 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change

如果我在Eclipse中启动调试器来调试我的C程序,它会显示一个gdb错误并崩溃。我可以从命令行毫无问题地运行调试器。这是gdb内部的一个问题。Eclipse是否可以使用一些不稳定的gdb命令

GNU gdb 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". *** Error in `gdb': free(): invalid next size (fast): 0x00000000031fc290 *** GNU GDB 7.7.1版权(C)2014免费软件基金会,许可证GPLV3+:GNU GPL版本3或更高版本:这是免费软件:您可以自由地改变和重新分配它。在法律允许的范围内,不存在任何担保。有关详细信息,请键入“显示复制”和“显示保修”。此GDB配置为“x86_64-linux-gnu”。键入“显示配置”以获取配置详细信息。有关错误报告说明,请参阅:。在线查找GDB手册和其他文档资源,网址:。要获得帮助,请键入“帮助”。键入“apropos word”搜索与“word”相关的命令。[启用使用libthread_db的线程调试]使用主机libthread_db库“/lib/x86_64-linux-gnu/libthread_db.so.1”。 ***“gdb”中出错:free():下一个大小无效(快速):0x00000000031fc290*** 762450 2-gdb-version 762450~“GNU gdb 7.7.1\n” 762457 ~版权(C)2014免费软件基金会 762457~“许可证GPLv3+:GNU GPL版本3或更高版本\n这是fre\ e软件:您可以自由更改和重新发布。\n在允许的范围内,不提供任何保修\ 受法律保护。有关详细信息,请键入“显示复制”和“显示保修”。\n 762458~“此GDB已配置为\“x86_64-linux-gnu\”\n键入“显示配置\”以进行配置\ 详细信息。” 762458~“\n有关错误报告说明,请参阅:\n” 762458~“\n” 762458~“联机查找GDB手册和其他文档资源,网址为:\n。\n” 762458~“有关帮助,请键入\“帮助\\n” 762458~“键入\“apropos word\”以搜索与\“word\”相关的命令\n” 762458 2^完成 762459(gdb) 762462 3-environment-cd/home/wolle/workspace/simple 762462 3^完成 762462(gdb) 762463上挂起的4-gdb-set断点 762463 4^完成 762463(gdb) 762465 5-gdb-set在上的拨叉上分离 762466 5^完成 762466(gdb) 762467 6-enable-pretty-printing 762467完成 762467(gdb) 762468 7-gdb-set python打印堆栈无 762468 7^完成 762468(gdb) 762469 8-gdb-set打印对象打开 762470 8^完成 762470(gdb) 762471 9-gdb-set打印七位字符串 762472 9^完成 762472(gdb) 762473 10 gdb集主机字符集UTF-8 762473 10^完成 762473(gdb) 762474 11 gdb集目标字符集UTF-8 762474 11^完成 762474(gdb) 762478 12 gdb设置目标宽字符集UTF-32 762478 12^完成 762478(gdb) 762479 13 gdb设置dprintf样式调用 762480 13^完成 762480(gdb) 762481 14source.gdbinit 762481&“source.gdbinit\n” 762481&“.gdbinit:没有这样的文件或目录。\n” 762481 14^错误,msg=“.gdbinit:没有这样的文件或目录。” 762481(gdb) 762483 15 gdb设置目标异步关闭 762483 15^完成 762483(gdb) 762484 16 gdb设置自动solib附加模块 762484 16^完成 762485(gdb) 762488 17文件执行和符号——线程组i1/home/wolle/workspace/simple/D\ ebug/simple 762493 17^完成 762493(gdb) 762500 18 gdb显示——线程组i1语言 762500 18^完成,value=“自动” 762500(gdb) 762502 19 gdb集合--线程组i1语言c 762502 19^完成 762502(gdb) 762503 20解释器执行——线程组i1控制台“p/x(字符)-1” 762503~“$1=0xff\n” 762503 20^完成 762503(gdb) 762504 21列出线程组 762505 21^完成,组=[{id=“i1”,type=“process”,executable=“/home/wolle/workspace\ /简单/调试/简单“}] 762505(gdb) 762506 22数据求值表达式--线程组i1“sizeof(void*)” 762506 22^完成,value=“8” 762506(gdb) 762511 23 gdb集合--线程组i1语言自动 762512 23^完成 762512(gdb) 762513 24解释器执行——线程组i1控制台“show endian” 762513~“自动设置目标端号(当前为小端号)\n” 762513 24^完成 762513(gdb) 762520 25断开插入件-t-f干管 762520 25^done,bkpt={number=“1”,type=“breakpoint”,disp=“del”,enabled=“y”,addr=“0x000000000040053c”\ func=“main”,file=“../src/main.c”,fullname=“/home/wolle/workspace/simple/src/main\ c“,line=“14”,线程组=[“i1”],times=“0”,original location=“main”} 762521(gdb) 762522 26次tty集合--线程组i1/dev/pts/28 7625226^完成 762522(gdb) 762535 27执行运行--线程组i1 762537=线程组已启动,id=“i1”,pid=“14755” 762537=线程已创建,id=“1”,组id=“i1” 762538 27^正在运行 762538*正在运行,线程id=“全部” 762538(gdb) 762538 28列出线程组--可用 762548=已加载库,id=“/lib64/ld-linux-x86-64.so.2”,target name=“/lib64/ld-linux-x86-64.so.2”,h\ ost name=“/lib64/ld-linux-x86-64.so.2”,加载的符号=“0”,线程组=“i1” 762563=已加载库,id=“/lib/x86_64-linux-gnu/libc.so.6”,target name=“/lib/x86_64-linux-gnu/libc\ .so.6“,主机名=“/lib/x86_64-linux-gnu/libc.so.6”,加载的符号=“0”,线程组=“i1” 762721=断点已修改,bkpt={number=“1”,type=“breakpoint”,disp=“del”,enabled=“y”,addr=“0x00000\ 0000040053c“,func=“main”,file=“../src/main.c”,fullname=“/home/wolle/workspace/sim”\ ple/src/main.c“,line=“14”,线程组=[“i1”],times=“1”,original location=“main”} 762723*停止,原因=“断点命中”,disp=“del”,bkptno=“1”,帧={addr=“0x000000000040053c”,func\ =“main”,args=[{name=“argc”,value=“1”},{name=“argv”,value=“0x7fffffffdfc8”},file=“../src/main.c”,ful\ lname=“/home/wolle/workspace/simple/src/main.c”,line=“14”},thread id=“1”,已停止-\ threads=“全部”,core=“1” 762725=已删除断点,id=“1” 762725(gdb) 如何获取mi/gdb跟踪,请参阅:


问题可能是加载的线程库。我可以配置在Eclipse中关闭此功能吗?

重新启动计算机后,一切又恢复正常。我真的不知道问题出在哪里。

不幸的是,没有足够的细节来了解我的情况。您是否将其简化为HelloWorld大小的程序,即gdb+cdt是否总是崩溃?你能提供这个吗 762,450 2-gdb-version 762,450 ~"GNU gdb 7.7.1\n" 762,457 ~"Copyright (C) 2014 Free Software Foundation, Inc.\n" 762,457 ~"License GPLv3+: GNU GPL version 3 or later \nThis is fre\ e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\ ed by law. Type \"show copying\"\nand \"show warranty\" for details.\n" 762,458 ~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configur\ ation details." 762,458 ~"\nFor bug reporting instructions, please see:\n" 762,458 ~".\n" 762,458 ~"Find the GDB manual and other documentation resources online at:\n.\n" 762,458 ~"For help, type \"help\".\n" 762,458 ~"Type \"apropos word\" to search for commands related to \"word\".\n" 762,458 2^done 762,459 (gdb) 762,462 3-environment-cd /home/wolle/workspace/simple 762,462 3^done 762,462 (gdb) 762,463 4-gdb-set breakpoint pending on 762,463 4^done 762,463 (gdb) 762,465 5-gdb-set detach-on-fork on 762,466 5^done 762,466 (gdb) 762,467 6-enable-pretty-printing 762,467 6^done 762,467 (gdb) 762,468 7-gdb-set python print-stack none 762,468 7^done 762,468 (gdb) 762,469 8-gdb-set print object on 762,470 8^done 762,470 (gdb) 762,471 9-gdb-set print sevenbit-strings on 762,472 9^done 762,472 (gdb) 762,473 10-gdb-set host-charset UTF-8 762,473 10^done 762,473 (gdb) 762,474 11-gdb-set target-charset UTF-8 762,474 11^done 762,474 (gdb) 762,478 12-gdb-set target-wide-charset UTF-32 762,478 12^done 762,478 (gdb) 762,479 13-gdb-set dprintf-style call 762,480 13^done 762,480 (gdb) 762,481 14source .gdbinit 762,481 &"source .gdbinit\n" 762,481 &".gdbinit: No such file or directory.\n" 762,481 14^error,msg=".gdbinit: No such file or directory." 762,481 (gdb) 762,483 15-gdb-set target-async off 762,483 15^done 762,483 (gdb) 762,484 16-gdb-set auto-solib-add on 762,484 16^done 762,485 (gdb) 762,488 17-file-exec-and-symbols --thread-group i1 /home/wolle/workspace/simple/D\ ebug/simple 762,493 17^done 762,493 (gdb) 762,500 18-gdb-show --thread-group i1 language 762,500 18^done,value="auto" 762,500 (gdb) 762,502 19-gdb-set --thread-group i1 language c 762,502 19^done 762,502 (gdb) 762,503 20-interpreter-exec --thread-group i1 console "p/x (char)-1" 762,503 ~"$1 = 0xff\n" 762,503 20^done 762,503 (gdb) 762,504 21-list-thread-groups 762,505 21^done,groups=[{id="i1",type="process",executable="/home/wolle/workspace\ /simple/Debug/simple"}] 762,505 (gdb) 762,506 22-data-evaluate-expression --thread-group i1 "sizeof (void*)" 762,506 22^done,value="8" 762,506 (gdb) 762,511 23-gdb-set --thread-group i1 language auto 762,512 23^done 762,512 (gdb) 762,513 24-interpreter-exec --thread-group i1 console "show endian" 762,513 ~"The target endianness is set automatically (currently little endian)\n" 762,513 24^done 762,513 (gdb) 762,520 25-break-insert -t -f main 762,520 25^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x000000000040053c",\ func="main",file="../src/main.c",fullname="/home/wolle/workspace/simple/src/main.\ c",line="14",thread-groups=["i1"],times="0",original-location="main"} 762,521 (gdb) 762,522 26-inferior-tty-set --thread-group i1 /dev/pts/28 762,522 26^done 762,522 (gdb) 762,535 27-exec-run --thread-group i1 762,537 =thread-group-started,id="i1",pid="14755" 762,537 =thread-created,id="1",group-id="i1" 762,538 27^running 762,538 *running,thread-id="all" 762,538 (gdb) 762,538 28-list-thread-groups --available 762,548 =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",h\ ost-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1" 762,563 =library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc\ .so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1" 762,721 =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00000\ 0000040053c",func="main",file="../src/main.c",fullname="/home/wolle/workspace/sim\ ple/src/main.c",line="14",thread-groups=["i1"],times="1",original-location="main"} 762,723 *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x000000000040053c",func\ ="main",args=[{name="argc",value="1"},{name="argv",value="0x7fffffffdfc8"}],file="../src/main.c",ful\ lname="/home/wolle/workspace/simple/src/main.c",line="14"},thread-id="1",stopped-\ threads="all",core="1" 762,725 =breakpoint-deleted,id="1" 762,725 (gdb)