Chinaunix首页 | 论坛 | 博客
  • 博客访问: 206334
  • 博文数量: 32
  • 博客积分: 1415
  • 博客等级: 上尉
  • 技术积分: 295
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-06 20:47
文章分类

全部博文(32)

文章存档

2009年(11)

2008年(21)

我的朋友

分类:

2008-12-17 20:46:43

下面是几个相关于GDB语言环境的命令:

    show language
        查看当前的语言环境。如果GDB不能识为你所调试的编程语言,那么,C语言被认为是默认的环境。

    info frame
        查看当前函数的程序语言。

    info source
        查看当前文件的程序语言。

如果GDB没有检测出当前的程序语言,那么你也可以手动设置当前的程序语言。使用setlanguage命令即可做到。

    当set language命令后什么也不跟的话,你可以查看GDB所支持的语言种类:

        (gdb) set language
        The currently understood settings are:

        local or auto    Automatic setting based on source file
        c                Use the C language
        c++              Use the C++ language
        asm              Use the Asm language
        chill            Use the Chill language
        fortran          Use the Fortran language
        java             Use the Java language
        modula-2         Use the Modula-2 language
        pascal           Use the Pascal language
        scheme           Use the Scheme language

    于是你可以在set language后跟上被列出来的程序语言名,来设置当前的语言环境。

(系列完)
阅读(1014) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~