1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  14  * Copyright 2018 Joyent, Inc.
  15  */
  16 
  17 /*
  18  * A little program who's only purpose is to get all the
  19  * CTF type information we want into an object.
  20  */
  21 
  22 #include <sys/types.h>
  23 #include <sys/stat.h>
  24 #include <sys/sysmacros.h>
  25 #include <sys/corectl.h>
  26 #define _STRUCTURED_PROC        1
  27 #include <sys/procfs.h>
  28 #include <sys/auxv.h>
  29 #include <sys/old_procfs.h>
  30 #include <sys/utsname.h>
  31 #include <sys/secflags.h>
  32 
  33 /* prgregset_t is a define on intel */
  34 #ifdef prgregset_t
  35 typedef prgregset_t
  36 #undef prgregset_t
  37     prgregset_t;
  38 #endif
  39 
  40 /* instantiate the types for CTF */
  41 auxv_t auxv;
  42 prgregset_t prgregset;
  43 lwpstatus_t lwpstatus;
  44 pstatus_t pstatus;
  45 prstatus_t prstatus;
  46 psinfo_t psinfo;
  47 prpsinfo_t prpsinfo;
  48 lwpsinfo_t lwpsinfo;
  49 prcred_t prcred;
  50 prpriv_t prpriv;
  51 priv_impl_info_t priv_impl;
  52 fltset_t fltset;
  53 siginfo_t siginfo;
  54 sigset_t sigset;
  55 struct sigaction sigact;
  56 stack_t stack;
  57 sysset_t sysset;
  58 timestruc_t ts;
  59 struct utsname uts;
  60 prfdinfov1_t ptfd;
  61 prsecflags_t psf;
  62 prlwpname_t psn;