GDB: How to list all source files used for compilation

你离开我真会死。 提交于 2019-12-18 12:05:25

问题


New to the project, have multiple source files used for compilation and some "could" be dynamic libraries, loaded at runtime. When debugging the executable using "GDB", is there a command to list all the source files (static) used to build the executable. Once I have all the source files, it's easy for me to set breakpoints, list functions etc. I couldn't find a command to do it in GDB (I'm sure there should be one). In DDD (gui based gdb), there is a Menu: File->List, which lists all the source files used and static libraries used for building the executable. Unfortunately, for command line based debugger (GDB), I couldnt find an equivalent command.


回答1:


You are probably looking for info sources. info functions could also be helpful.

Don't forget you can do things like type break and then just press tab, which will list all relevant functions.



来源:https://stackoverflow.com/questions/22821344/gdb-how-to-list-all-source-files-used-for-compilation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!