Print this page
3946 ::gcore
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
*** 23,32 ****
--- 23,33 ----
* Use is subject to license terms.
*/
/*
* Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
*/
#ifndef _PCONTROL_H
#define _PCONTROL_H
*** 41,50 ****
--- 42,52 ----
#include <procfs.h>
#include <rtld_db.h>
#include <libproc.h>
#include <libctf.h>
#include <limits.h>
+ #include <libproc.h>
#ifdef __cplusplus
extern "C" {
#endif
*** 188,204 ****
elf_file_header_t e_hdr; /* Extended ELF header */
Elf *e_elf; /* ELF library handle */
int e_fd; /* file descriptor */
} elf_file_t;
- typedef struct ps_rwops { /* ops vector for Pread() and Pwrite() */
- ssize_t (*p_pread)(struct ps_prochandle *,
- void *, size_t, uintptr_t);
- ssize_t (*p_pwrite)(struct ps_prochandle *,
- const void *, size_t, uintptr_t);
- } ps_rwops_t;
-
#define HASHSIZE 1024 /* hash table size, power of 2 */
struct ps_prochandle {
struct ps_lwphandle **hashtab; /* hash table for LWPs (Lgrab()) */
mutex_t proc_lock; /* protects hash table; serializes Lgrab() */
--- 190,199 ----
*** 225,244 ****
auxv_t *auxv; /* the process's aux vector */
int nauxv; /* number of aux vector entries */
rd_agent_t *rap; /* cookie for rtld_db */
map_info_t *map_exec; /* the mapping for the executable file */
map_info_t *map_ldso; /* the mapping for ld.so.1 */
! const ps_rwops_t *ops; /* pointer to ops-vector for read and write */
! core_info_t *core; /* information specific to core (if PS_DEAD) */
uintptr_t *ucaddrs; /* ucontext-list addresses */
uint_t ucnelems; /* number of elements in the ucaddrs list */
char *zoneroot; /* cached path to zone root */
plist_t fd_head; /* head of file desc info list */
int num_fd; /* number of file descs in list */
uintptr_t map_missing; /* first missing mapping in core due to sig */
siginfo_t killinfo; /* signal that interrupted core dump */
psinfo_t spymaster; /* agent LWP's spymaster, if any */
};
/* flags */
#define CREATED 0x01 /* process was created by Pcreate() */
#define SETSIG 0x02 /* set signal trace mask before continuing */
--- 220,239 ----
auxv_t *auxv; /* the process's aux vector */
int nauxv; /* number of aux vector entries */
rd_agent_t *rap; /* cookie for rtld_db */
map_info_t *map_exec; /* the mapping for the executable file */
map_info_t *map_ldso; /* the mapping for ld.so.1 */
! ps_ops_t ops; /* ops-vector */
uintptr_t *ucaddrs; /* ucontext-list addresses */
uint_t ucnelems; /* number of elements in the ucaddrs list */
char *zoneroot; /* cached path to zone root */
plist_t fd_head; /* head of file desc info list */
int num_fd; /* number of file descs in list */
uintptr_t map_missing; /* first missing mapping in core due to sig */
siginfo_t killinfo; /* signal that interrupted core dump */
psinfo_t spymaster; /* agent LWP's spymaster, if any */
+ void *data; /* private data */
};
/* flags */
#define CREATED 0x01 /* process was created by Pcreate() */
#define SETSIG 0x02 /* set signal trace mask before continuing */
*** 245,254 ****
--- 240,250 ----
#define SETFAULT 0x04 /* set fault trace mask before continuing */
#define SETENTRY 0x08 /* set sysentry trace mask before continuing */
#define SETEXIT 0x10 /* set sysexit trace mask before continuing */
#define SETHOLD 0x20 /* set signal hold mask before continuing */
#define SETREGS 0x40 /* set registers before continuing */
+ #define INCORE 0x80 /* use in-core data to build symbol tables */
struct ps_lwphandle {
struct ps_prochandle *lwp_proc; /* process to which this lwp belongs */
struct ps_lwphandle *lwp_hash; /* hash table linked list */
lwpstatus_t lwp_status; /* status when stopped */