kvm_t fields

Hi, I am new to FreeBSD development (or any non-Linux Unix-like development), and am having trouble tracking down what exactly are the constituent parts of the kvm_t type. If anyone has it on hand, or perhaps better yet, has a resource where I could find the definition of this struct and others like it, that would be great.
 
Hello,

Download FreeBSD sources and check files /usr/src/lib/libkvm/kvm.h and /usr/src/lib/libkvm/kvm_private.h.
 
Thank you. Posting the struct definition in case someone ends up here via a search:

Code:
struct __kvm {
    /*
     * a string to be prepended to error messages
     * provided for compatibility with sun's interface
     * if this value is null, errors are saved in errbuf[]
     */
    const char *program;
    char    *errp;        /* XXX this can probably go away */
    char    errbuf[_POSIX2_LINE_MAX];
#define ISALIVE(kd) ((kd)->vmfd >= 0)
    int    pmfd;        /* physical memory file (or crashdump) */
    int    vmfd;        /* virtual memory file (-1 if crashdump) */
    int    unused;        /* was: swap file (e.g., /dev/drum) */
    int    nlfd;        /* namelist file (e.g., /kernel) */
    struct kinfo_proc *procbase;
    char    *argspc;    /* (dynamic) storage for argv strings */
    int    arglen;        /* length of the above */
    char    **argv;        /* (dynamic) storage for argv pointers */
    int    argc;        /* length of above (not actual # present) */
    char    *argbuf;    /* (dynamic) temporary storage */
    /*
     * Kernel virtual address translation state.  This only gets filled
     * in for dead kernels; otherwise, the running kernel (i.e. kmem)
     * will do the translations for us.  It could be big, so we
     * only allocate it if necessary.
     */
    struct vmstate *vmst;
    int    rawdump;    /* raw dump format */
};
 
monono said:
Hi, I am new to FreeBSD development (or any non-Linux Unix-like development), and am having trouble tracking down what exactly are the constituent parts of the kvm_t type. If anyone has it on hand, or perhaps better yet, has a resource where I could find the definition of this struct and others like it, that would be great.

If you are dealing with tracking definition on regular basis, perhaps using an IDE would be a good solution. Most IDEs support definition tracking and will parse/search headers for you.
 
Back
Top