/* Compile on the DragonFlyBSD guest to print struct sizes used by kern_checkpoint.c */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/reg.h>
#include <sys/procfs.h>
#include <sys/elf_common.h>
#include <sys/elf64.h>
#include <stdio.h>

int main(void) {
    printf("sizeof(int)        = %zu\n", sizeof(int));
    printf("sizeof(size_t)     = %zu\n", sizeof(size_t));
    printf("sizeof(pid_t)      = %zu\n", sizeof(pid_t));
    printf("sizeof(gregset_t)  = %zu  (struct reg)\n", sizeof(gregset_t));
    printf("sizeof(fpregset_t) = %zu  (struct fpreg)\n", sizeof(fpregset_t));
    printf("sizeof(prstatus_t) = %zu\n", sizeof(prstatus_t));
    printf("sizeof(prfpregset_t) = %zu\n", sizeof(prfpregset_t));
    printf("sizeof(prpsinfo_t) = %zu\n", sizeof(prpsinfo_t));
    printf("MAXCOMLEN          = %d\n", MAXCOMLEN);
    printf("PRARGSZ            = %d\n", PRARGSZ);
    printf("PRSTATUS_VERSION   = %d\n", PRSTATUS_VERSION);
    printf("PRPSINFO_VERSION   = %d\n", PRPSINFO_VERSION);
    printf("sizeof(Elf_Note)  = %zu\n", sizeof(Elf_Note));
    printf("sizeof(Elf64_Ehdr) = %zu\n", sizeof(Elf64_Ehdr));
    printf("sizeof(Elf64_Phdr) = %zu\n", sizeof(Elf64_Phdr));
    return 0;
}
