如何在 gdb 中保存设置? [英] How to save settings in gdb?

查看:49
本文介绍了如何在 gdb 中保存设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何保存 gdb 设置(例如set print pretty on"或set print elements 0",都来自 这里)?我不想每次使用 gdb 时都设置我的配置:/

Does anyone know how to save gdb settings (like "set print pretty on" or "set print elements 0", both from here)? I don't want to set my configuration every time that I will use gdb :/

我在 google 和 SO 中搜索过,但一无所获.

I searched in google and SO, but I found nothing.

推荐答案

在您的主目录的 .gdbinit 文件中添加您想要自动运行的任何命令.

Add any commands you want to auto run in the .gdbinit file in your home directory.

这篇关于如何在 gdb 中保存设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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