How to change the eflags register value in GDB?

前端 未结 4 2072
一生所求
一生所求 2021-02-03 10:55

set $eflags does not change eflags value.

The old eflags value remains after eg. =>$set $eflag=0x243 [this is just

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-03 11:24

    It's wrong to set all flags in eflags register. So some bits reserved and must be 0.(3,5,15,22 and greater) bit 1 must be 1. There is rflags too. But all hi dword is zero. So there is no need to use rflags instead of eflags for all operations changed flags. But I know peoples that use free bits for own usage.

    More suitable rflags hi dword. So in 64-bit architecture enough free registers to use. But in 32-bit architecture, no. So strongly recommend to do so.

    Because in future architectures some of these bits may be used. But these flags are not touched from changing 32-bit to 64-bit. If the only register that may be not changed at all. So all possible reasons for any case already used. I don't imagine any situation that may be used some additional flag don't be used till now. It may be to some cardinal processor architecture change. I don't think some decide to do so for obvious reason all soft must be thrown out and rewritten from the very beginning. It's extremely hard and huge work.

提交回复
热议问题