Debugging with GDB (6) gdb 命令

1. 回车重复。 windbg也实现了。shell不可能实现。(有些命令不支持,比如run,因为不能支持)
2. 支持Tab自动完成,跟shell一样。命令和symbol都支持。
    <ESC> followed by ?. 可以打印出所有可能。比如输入info 然后<ESC> followed by ?
    (gdb) inf
    inferior  info
    还能支持结构成员变量扩展
3. 命令可以接参数,比如step 5
4. 命令只要没有二义就不用写全。 更有甚者(这样的设计很好),有二义也有二义的优先级,比如s就指的是step
5. Getting Help
    help
    h
    help class
        e.g. help status
    help command
        e.g. help step
    apropos args
        打印出所有可能,包括文档
        apropos alias
    complete args
        以args开头的命令,不同于apropos
    info
    set
        set prompt $
    show
Example:

 1 (gdb) show radix
 2 Input and output radices set to decimal 10, hex a, octal 12.
 3 (gdb) apropos radix
 4 set input-radix -- Set default input radix for entering numbers
 5 set output-radix -- Set default output radix for printing of values
 6 set radix -- Set default input and output number radices
 7 show input-radix -- Show default input radix for entering numbers
 8 show output-radix -- Show default output radix for printing of values
 9 show radix -- Show the default input and output number radices
10 (gdb) set input-radix 2
11 Input radix now set to decimal 2, hex 2, octal 2.
12 (gdb) show radix
13 Input radix set to decimal 2, hex 2, octal 2.
14 Output radix set to decimal 10, hex a, octal 12.

 

转载于:https://www.cnblogs.com/xjsllll/archive/2013/03/28/2987328.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值