You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
A related issue to ABI types is ABI alignment. Different compilers may decide to align struct members differently if they are not the same width and there are holes. While using compiler directives on the struct like __attribute__((packed)) can help deal with that, not all compilers recognize them. So usually you want to add padding fields to align everything to 8-byte. A useful tool for checking this is pahole
And for example in this struct:
struct kvm_vmi_event_debug {
__u32 type;
__u8 single_step;
__u8 watchpoint; // There is a 2 byte hole after this member, you want a __u16 _pad member added.
__u64 watchpoint_gva;
int32_t watchpoint_flags;
int32_t exception;
};`
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A related issue to ABI types is ABI alignment. Different compilers may decide to align struct members differently if they are not the same width and there are holes. While using compiler directives on the struct like
__attribute__((packed))
can help deal with that, not all compilers recognize them. So usually you want to add padding fields to align everything to 8-byte. A useful tool for checking this is paholeAnd for example in this struct:
The text was updated successfully, but these errors were encountered: