gdb总出现SIGTRAP,怎么办
发布网友
发布时间:2022-04-20 03:58
我来回答
共2个回答
热心网友
时间:2023-06-23 13:24
只需手动清除该位即可:
(gdb) set $ps&=~(1<<8) 【on x86-based machines $ps is an alias for the eflags register,TF is the 9th bit of eflags】
(gdb) info registers
eax 0x1 1
ecx 0xbf90f353 -1081019565
edx 0x1 1
ebx 0x0 0
esp 0xbf90f324 0xbf90f324
ebp 0xbf90f358 0xbf90f358
esi 0x92dca0 9624736
edi 0x0 0
eip 0xe66402 0xe66402 <__kernel_vsyscall+2>
eflags 0x200246 [ PF ZF IF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb)
再continue,gdb就不会不停收到SIGTRAP了
热心网友
时间:2023-06-23 13:24
只需手动清楚该位即可:
(gdb) set $ps&=~(1<<8) 【on x86-based machines $ps is an alias for the eflags register,TF is the 9th bit of eflags】
(gdb) info registers
eax 0x1 1
ecx 0xbf90f353 -1081019565
edx 0x1 1
ebx 0x0 0
esp 0xbf90f324 0xbf90f324
ebp 0xbf90f358 0xbf90f358
esi 0x92dca0 9624736
edi 0x0 0
eip 0xe66402 0xe66402 <__kernel_vsyscall+2>
eflags 0x200246 [ PF ZF IF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb)
再continue,gdb就不会不停收到SIGTRAP了