gdabah / distorm

Powerful Disassembler Library For x86/AMD64
Other
1.26k stars 238 forks source link

Missing _RegisterType R_EIP enum? #110

Closed PatrickvL closed 7 years ago

PatrickvL commented 7 years ago

As the title says, where's the R_EIP enum in _RegisterType? Should one use R_RIP instead, also on 32 bit decodes? Or is it an ommision that could be corrected?

gdabah commented 7 years ago

What use do you have for it in 32 bit? That register doesn't exist.

PatrickvL commented 7 years ago

Well, in winnt.h, there's an Eip member in the CONTEXT struct (which in turn is pointed to from an LPEXCEPTION_POINTERS member called ContextRecord).

For most other members in the CONTEXT struct, there's a _RegisterType companion, but not Eip - hence tis question.

PatrickvL commented 7 years ago

Here the code where I was planning to add R_EIP to : https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/master/src/CxbxKrnl/EmuX86.cpp#L260 - it's an exception handler for opcodes that trigger an access violation, when accessing hardware that isn't present, and will have to be emulated in that project.

gdabah commented 7 years ago

It seems you lack the understanding of how it all works. If you need further help talk to me on distorm@gmail.com, this is not a bug and I'm closing it.