Chinaunix首页 | 论坛 | 博客
  • 博客访问: 754728
  • 博文数量: 265
  • 博客积分: 6010
  • 博客等级: 准将
  • 技术积分: 1985
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-13 12:33
文章分类

全部博文(265)

文章存档

2011年(1)

2010年(66)

2009年(198)

我的朋友

分类:

2009-08-24 09:03:33


2.13 在GDB中x/4i时不想看到符号式偏移



Q:



(gdb) x/4i $pc

0xb7ef48d0 sendmsg:   cmpl   $0x0,%gs:0xc

0xb7ef48d8 sendmsg+8: jne    0xb7ef48f9 

0xb7ef48da sendmsg+10:        mov    %ebx,%edx

0xb7ef48dc sendmsg+12:        mov    $0x66,%eax



我不想要sendmsg+n这种显示。



A:



(gdb) set print max-symbolic-offset 0   // 缺省为0,表示unlimited

(gdb) x/4i $pc

0xb7ef48d0 sendmsg:   cmpl   $0x0,%gs:0xc

0xb7ef48d8 sendmsg+8: jne    0xb7ef48f9 

0xb7ef48da sendmsg+10:        mov    %ebx,%edx

0xb7ef48dc sendmsg+12:        mov    $0x66,%eax



(gdb) set print max-symbolic-offset 1

(gdb) x/4i $pc

0xb7ef48d0 sendmsg:   cmpl   $0x0,%gs:0xc

0xb7ef48d8:     jne    0xb7ef48f9

0xb7ef48da:     mov    %ebx,%edx

0xb7ef48dc:     mov    $0x66,%eax



暂时没有找到办法彻底禁止符号式偏移出现。



类别:
阅读(1098) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~