URI:
       telfcore.h - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       telfcore.h (2565B)
       ---
            1 /* Copyright (c) 2002, 2003 William Josephson */
            2 
            3 enum {
            4         CoremapMagic        = 0xba5eba11,
            5         CoremapMax        = 128,
            6 };
            7 #undef MAXCOMLEN
            8 #define MAXCOMLEN 16
            9 #define PRSTATUS_VERSION        1        /* Current version of prstatus_t */
           10 #define PRPSINFO_VERSION        1        /* Current version of prpsinfo_t */
           11 #define PRARGSZ                        80        /* Maximum argument bytes saved */
           12 
           13 
           14 typedef struct Coremap Coremap;
           15 typedef struct CoremapItem CoremapItem;
           16 typedef struct CoremapHeader CoremapHeader;
           17 typedef struct ElfNote ElfNote;
           18 typedef struct Reg386 Reg386;
           19 typedef struct PrStatus386 PrStatus386;
           20 typedef struct PrPsinfo PrPsinfo;
           21 
           22 struct CoremapHeader {
           23         u32int        magic;
           24         u32int        counter;
           25         u32int        maxelem;
           26 };
           27 
           28 struct CoremapItem {
           29         u32int        address;
           30         u32int        size;
           31 };
           32 
           33 struct Coremap {
           34         CoremapHeader        header;
           35         CoremapItem        map[CoremapMax];
           36 };
           37 
           38 struct ElfNote {
           39         u32int        namesz;
           40         u32int        descsz;
           41         u32int        type;
           42         char        *name;
           43         uchar        *desc;
           44         u32int        offset;        /* in-memory only */
           45 };
           46 
           47 enum
           48 {
           49         NotePrStatus = 1,
           50         NotePrFpreg = 2,
           51         NotePrPsinfo = 3,
           52         NotePrTaskstruct = 4,
           53         NotePrAuxv = 6,
           54         NotePrXfpreg = 0x46e62b7f,        /* according to gdb */
           55 };
           56 #if 0
           57 struct Reg386
           58 {
           59         u32int        fs;
           60         u32int        es;
           61         u32int        ds;
           62         u32int        edi;
           63         u32int        esi;
           64         u32int        ebp;
           65         u32int        isp;
           66         u32int        ebx;
           67         u32int        edx;
           68         u32int        ecx;
           69         u32int        eax;
           70         u32int        trapno;
           71         u32int        err;
           72         u32int        eip;
           73         u32int        cs;
           74         u32int        eflags;
           75         u32int        esp;
           76         u32int        ss;
           77         u32int        gs;
           78 };
           79 #endif
           80 
           81 struct Reg386
           82 {
           83         u32int        ebx;
           84         u32int        ecx;
           85         u32int        edx;
           86         u32int        esi;
           87         u32int        edi;
           88         u32int        ebp;
           89         u32int        eax;
           90         u32int        ds;
           91         u32int        es;
           92         u32int        fs;
           93         u32int        gs;
           94         u32int        origeax;
           95         u32int        eip;
           96         u32int        cs;
           97         u32int        eflags;
           98         u32int        esp;
           99         u32int        ss;
          100 };
          101 
          102 #if 0
          103 struct PrStatus386
          104 {
          105     u32int                version;        /* Version number of struct (1) */
          106     u32int                statussz;        /* sizeof(prstatus_t) (1) */
          107     u32int                gregsetsz;        /* sizeof(gregset_t) (1) */
          108     u32int                fpregsetsz;        /* sizeof(fpregset_t) (1) */
          109     int                        osreldate;        /* Kernel version (1) */
          110     int                        cursig;        /* Current signal (1) */
          111     pid_t                pid;                /* Process ID (1) */
          112     Reg386                reg;                /* General purpose registers (1) */
          113 };
          114 #endif
          115 
          116 struct PrPsinfo
          117 {
          118     int                version;                /* Version number of struct (1) */
          119     u32int        psinfosz;                /* sizeof(prpsinfo_t) (1) */
          120     char        fname[MAXCOMLEN+1];        /* Command name, null terminated (1) */
          121     char        psargs[PRARGSZ+1];        /* Arguments, null terminated (1) */
          122 };
          123 
          124 struct PrStatus386
          125 {
          126         u32int        signo;
          127         u32int        code;
          128         u32int        errno;
          129         u32int        cursig;
          130         u32int        sigpend;
          131         u32int        sighold;
          132         u32int        pid;
          133         u32int        ppid;
          134         u32int        pgrp;
          135         u32int        sid;
          136         u32int        utime[2];
          137         u32int        stime[2];
          138         u32int        cutime[2];
          139         u32int        cstime[2];
          140         Reg386        reg;
          141         u32int        fpvalid;
          142 };