简体   繁体   English

在Eclipse中调试C程序时出错

[英]Error while debugging C program in eclipse

When I am debugging c program using gdb in Eclipse I am getting this error "Can't find a source file at "/build/buildd/eglibc-2.19/csu/libc-start.c" . 在Eclipse中使用gdb调试c程序时,出现此错误“在/build/buildd/eglibc-2.19/csu/libc-start.c找不到源文件”

I observed this error comes when I am using malloc to allocate memory. 我观察到使用malloc分配内存时出现此错误。 But when debug and press step into it got skipped. 但是,当调试并按入时,它被跳过了。

When I am running simple program where malloc is used still same problem. 当我运行使用malloc简单程序时,仍然存在同样的问题。

Your debugger is looking for the source code for malloc . 您的调试器正在寻找malloc的源代码。 When debugging, you generally don't need to go into the source for system/library functions, as bugs are most likely not there. 调试时,通常不需要进入系统/库功能的源代码,因为很可能没有错误。 Just step over those functions when debugging and you should be fine. 调试时只需跳过这些功能,就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM