cgdb 调试_为什么使用 cgdb 打开的调试文件不显示源代码
时间: 2024-05-15 21:14:12 浏览: 12
使用 cgdb 调试时,如果不显示源代码,可能是由于以下原因:
1. 未正确设置源代码路径:在 cgdb 中,需要设置源代码路径,以便程序能够找到源代码文件。您可以使用命令“dir”或“directory”来设置源代码路径,例如:
```
(cgdb) dir /path/to/source/code
```
如果源代码文件在当前目录中,则可以使用以下命令:
```
(cgdb) dir .
```
2. 没有使用 -g 选项编译程序:在编译程序时,需要使用 -g 选项以生成调试信息。如果没有使用 -g 选项编译程序,则无法在 cgdb 中查看源代码。
3. 没有正确安装调试符号文件:如果在编译程序时使用了 -g 选项,但在 cgdb 中仍然无法查看源代码,则可能是由于未正确安装调试符号文件。您可以使用以下命令来安装调试符号文件:
```
sudo apt-get install libc6-dbg
```
以上是常见的情况,如果以上方法都无法解决问题,建议您检查 cgdb 的版本是否支持调试。
相关问题
ERROR 1146 (42S02) at line 1 : Table 'cgdb16802253898158scu7.cutomer' doesn't exist
This error message indicates that the table named "cutomer" does not exist in the database with the name "cgdb16802253898158scu7". There could be several reasons for this error, such as if the table was deleted or if there was a typo in the table name. To resolve this error, you may need to create the missing table or check that the table name is correct.
nr-softmodem
nr-softmodem是一个在LTE网络中运行的软件模拟器,用于对gnb(5G基站)进行解析和调试。它是基于版本OAI_develop_210827开发的。nr-softmodem可以通过使用--single-thread-enable参数来禁用单线程模式,以提高性能和效率。
在gdb调试和仿真方面,可以使用nr-uesoftmodem命令来在ue端进行调试和仿真。可以通过设置RFSIMULATOR环境变量为127.0.0.1,并执行sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem命令来启动ue端的仿真。
对于server端的调试和仿真,可以使用nr-softmodem命令。首先需要在ubuntu终端中输入export RFSIMULATOR=server,然后使用sudo cgdb --args ./nr-softmodem命令启动cgdb调试器。可以通过设置RFSIMULATOR环境变量为server,并使用--command set enviroment RFSIMULATOR=server --rfsimulator.options saviq参数来设置仿真选项。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [OAI NR nr-softmodem初步解析](https://blog.csdn.net/u010748717/article/details/120137148)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [[OpenAirInterface实战-11] :OAI nr-softmodem命令行参数详解](https://blog.csdn.net/HiWangWenBing/article/details/120790128)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)