GDB:如何列出用于编译的所有源文件 [英] GDB: How to list all source files used for compilation

查看:677
本文介绍了GDB:如何列出用于编译的所有源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

项目新增,有多个源文件用于编译,一些可能是动态库,在运行时加载。当使用GDB调试可执行文件时,是否有命令列出用于构建可执行文件的所有源文件(静态)。一旦我拥有所有的源文件,我很容易设置断点,列表功能等。我找不到一个命令来做它在GDB(我确定应该有一个)。在DDD(基于gui的gdb)中,有一个Menu:File-> List,它列出了使用的所有源文件和用于构建可执行文件的静态库。不幸的是,对于基于命令行的调试器(GDB),我找不到等效的命令。

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.

推荐答案

你可能正在寻找信息来源

不要忘记你可以做类似 break 的事情,然后只是按Tab键,其中列出所有相关功能。

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

这篇关于GDB:如何列出用于编译的所有源文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆