分类:
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 0xb7ef48f90xb7ef48da 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 暂时没有找到办法彻底禁止符号式偏移出现。