【问题标题】:Where is GDB's gdbinit file when using cygwin?使用cygwin时GDB的gdbinit文件在哪里?
【发布时间】:2015-11-10 22:20:38
【问题描述】:

我想关注这个问题的答案:

Permanently Change Disassembly Flavor in GDB

但它引用了一个名为 .gdbinit 的 GDB 文件。通过cygwin使用GDB的等效文件是什么?

【问题讨论】:

    标签: debugging gdb cygwin gnu


    【解决方案1】:

    gdb 帮助输出告诉你它在哪里寻找启动:

    $ gdb --help | tail
                         Set GDB's data-directory to DIR.
    
    At startup, GDB reads the following init files and executes their commands:
       * user-specific init file: /home/davidw/.gdbinit
       * local init file (see also 'set auto-load local-gdbinit'): ./.gdbinit
    
    For more information, type "help" from within GDB, or consult the
    GDB manual (available as on-line info or a printed manual).
    Report bugs to "<http://www.gnu.org/software/gdb/bugs/>".
    

    您还可以使用以下命令从 gdb 中获取更多信息 show autoload.

    另见在线手册here

    与这个问题并不真正相关,但我花时间研究这个问题的原因是,在 cygwin 中,我的 .gdbinit 似乎被忽略了。结果是我的 .gdbinit 中的命令是 ignored

    【讨论】:

    • btw cygwin 曾经拥有自己的 .gdbinit 文件调用 gdb.ini 如果我这样做 touch ~/gdb.ini 然后 gdb 将不再启动。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多