angr / archinfo

Classes with architecture-specific information useful to other projects.
BSD 2-Clause "Simplified" License
84 stars 58 forks source link

Synchronize segment register names for i386 and amd64 #211

Open Kyle-Kyle opened 4 months ago

Kyle-Kyle commented 4 months ago

Description

segment registers have different name for i386, amd64 in archinfo, which is quite annoying specifically, in archinfo, i386 calls them normally like "cs", "ds", "es", "fs", "gs", "ss", but amd64 calls them "cs_seg", "ds_seg", which is annoying when developing something relevant to those registers.

i386: https://github.com/angr/archinfo/blob/master/archinfo/arch_x86.py#L56 amd64: https://github.com/angr/archinfo/blob/master/archinfo/arch_amd64.py#L442

Alternatives

No response

Additional context

No response

Kyle-Kyle commented 4 months ago

context: I'm developing a segment register filter for angrop: https://github.com/angr/angrop/blob/154310eccc153b44e868b8e454b3043207ea8525/angrop/arch.py#L60