/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
#ifndef _PCONTROL_H
#define _PCONTROL_H
/*
* Implemention-specific include file for libproc process management.
* This is not to be seen by the clients of libproc.
*/
#include <stdio.h>
#include <gelf.h>
#include <synch.h>
#include <procfs.h>
#include <rtld_db.h>
#include <libproc.h>
#include <libctf.h>
#include <limits.h>
#include <libproc.h>
#include <sys/secflags.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "Putil.h"
/*
* Definitions of the process control structures, internal to libproc.
* These may change without affecting clients of libproc.
*/
/*
* sym_tbl_t contains a primary and an (optional) auxiliary symbol table, which
* we wish to treat as a single logical symbol table. In this logical table,
* the data from the auxiliary table preceeds that from the primary. Symbol
* indices start at [0], which is the first item in the auxiliary table
* if there is one. The sole purpose for this is so that we can treat the
* combination of .SUNW_ldynsym and .dynsym sections as a logically single
* entity without having to violate the public interface to libelf.
*
* Both tables must share the same string table section.
*
* The symtab_getsym() function serves as a gelf_getsym() replacement
* that is aware of the two tables and makes them look like a single table
* to the caller.
*
*/
} sym_tbl_t;
} file_info_t;
} map_info_t;
#endif
} lwp_info_t;
typedef struct fd_info {
} fd_info_t;
#endif
} core_info_t;
} elf_file_t;
struct ps_prochandle {
};
/* flags */
struct ps_lwphandle {
};
/*
* Implementation functions in the process control library.
* These are not exported to clients of the library.
*/
extern void prldump(const char *, lwpstatus_t *);
extern int dupfd(int, int);
extern int set_minfd(void);
extern int Pscantext(struct ps_prochandle *);
extern void Pinitsym(struct ps_prochandle *);
extern void Preadauxvec(struct ps_prochandle *);
extern void optimize_symtab(sym_tbl_t *);
extern char *Pfindexec(struct ps_prochandle *, const char *,
int (*)(const char *, void *), void *);
extern char *Pzonepath(struct ps_prochandle *, const char *, char *,
size_t);
size_t);
prmap_t *);
extern void Psort_mappings(struct ps_prochandle *);
extern char procfs_path[PATH_MAX];
/*
* Architecture-dependent definition of the breakpoint instruction.
*/
#endif
/*
* Simple convenience.
*/
#define FALSE 0
#ifdef __cplusplus
}
#endif
#endif /* _PCONTROL_H */