mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-21 05:45:19 +00:00
debug offsets
This commit is contained in:
@@ -102,6 +102,11 @@ int main(int argc, char *argv[])
|
||||
printf("iovec %zu %zu\n", sizeof(struct iovec), _Alignof(struct iovec));
|
||||
|
||||
printf("semid_ds %zu %zu\n", sizeof(struct semid_ds), _Alignof(struct semid_ds));
|
||||
printf("semid_ds.sem_perm %zu\n", offsetof(struct semid_ds, sem_perm));
|
||||
printf("semid_ds.sem_otime %zu\n", offsetof(struct semid_ds, sem_otime));
|
||||
printf("semid_ds.sem_ctime %zu\n", offsetof(struct semid_ds, sem_ctime));
|
||||
printf("semid_ds.sem_nsems %zu\n", offsetof(struct semid_ds, sem_nsems));
|
||||
|
||||
printf("sembuf %zu %zu\n", sizeof(struct sembuf), _Alignof(struct sembuf));
|
||||
|
||||
printf("itimerval %zu %zu\n", sizeof(struct itimerval), _Alignof(struct itimerval));
|
||||
|
||||
@@ -68,6 +68,11 @@ main :: proc() {
|
||||
fmt.println("iovec", size_of(posix.iovec), align_of(posix.iovec))
|
||||
|
||||
fmt.println("semid_ds", size_of(posix.semid_ds), align_of(posix.semid_ds))
|
||||
fmt.println("semid_ds.sem_perm", offset_of(posix.semid_ds, sem_perm))
|
||||
fmt.println("semid_ds.sem_otime", offset_of(posix.semid_ds, sem_otime))
|
||||
fmt.println("semid_ds.sem_ctime", offset_of(posix.semid_ds, sem_ctime))
|
||||
fmt.println("semid_ds.sem_nsems", offset_of(posix.semid_ds, sem_nsems))
|
||||
|
||||
fmt.println("sembuf", size_of(posix.sembuf), align_of(posix.sembuf))
|
||||
|
||||
fmt.println("itimerval", size_of(posix.itimerval), align_of(posix.itimerval))
|
||||
|
||||
Reference in New Issue
Block a user