ramdata.h revision 134a1f4e3289b54e0f980e9cf05352e419a60bee
/*
* 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 (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _RAMDATA_H
#define _RAMDATA_H
#ifdef __cplusplus
extern "C" {
#endif
/*
*/
#include <errno.h>
#include <signal.h>
#include <synch.h>
#include <thread.h>
#include <thread_db.h>
#include "htbl.h"
/*
* Set type for possible filedescriptors.
*/
typedef struct {
} fileset_t;
/*
* Previous stop state enumeration (used by signalled() and requested()).
*/
#define SLEEPING 1
#define JOBSIG 2
#define JOBSTOP 3
/*
* Simple convenience.
*/
#ifdef TRUE
#endif
#ifdef FALSE
#endif
#define TRUE 1
#define FALSE 0
/*
* Definition of private data. See get_private().
*/
#define CACHE_LN_SZ 64
typedef struct private {
int length; /* length of printf() output so far */
struct { /* remembered parameters for make_pname() */
int ff;
int lf;
} pparam;
int Errno; /* errno for controlled process's syscall */
int ErrPriv; /* privilege missing for last syscall */
long Rval1; /* rval1 (%r0) for syscall */
long Rval2; /* rval2 (%r1) for syscall */
int sys_nargs; /* number of arguments to the last syscall */
int sys_indirect; /* if TRUE, this is an indirect system call */
char *sys_path; /* pathname given to syscall */
int sys_valid; /* pathname was fetched and is valid */
char *sys_string; /* buffer for formatted syscall string */
char *exec_string; /* copy of sys_string for exec() only */
char *str_buffer; /* fetchstring() buffer */
int recur; /* show_strioctl() -- to prevent recursion */
int seconds; /* seconds, fraction for timestamps */
int fraction; /* fraction in 1/10 milliseconds */
} private_t;
extern char *command; /* name of command ("truss") */
extern int interrupt; /* interrupt signal was received */
extern int sigusr1; /* received SIGUSR1 (release process) */
extern int sfd; /* file descriptor to shared tmp file */
extern int istty; /* TRUE iff output is a tty */
extern int Fflag; /* option flags from getopt() */
extern int fflag;
extern int cflag;
extern int aflag;
extern int eflag;
extern int iflag;
extern int lflag;
extern int tflag;
extern int pflag;
extern int sflag;
extern int mflag;
extern int oflag;
extern int vflag;
extern int xflag;
extern int hflag;
extern int dflag;
extern int Dflag;
extern int Eflag;
extern int Tflag;
extern int Sflag;
extern int Mflag;
extern int truss_nlwp; /* number of truss lwps */
extern int truss_maxlwp; /* number of entries in truss_lwpid */
struct syscount {
long count; /* system call count */
long error; /* system call errors */
};
struct counts { /* structure for keeping counts */
};
struct global_psinfo {
};
struct bkpt { /* to describe one function's entry point */
char *sym_name; /* function name */
int flags; /* see below */
};
struct dynlib { /* structure for tracing functions */
char *lib_name; /* full library name */
char *match_name; /* library name used in name matching */
char *prt_name; /* library name for printing */
int built; /* if true, bkpt list has been built */
int present; /* true if library is still present */
};
struct dynpat { /* structure specifying patterns for dynlib's */
const char **libpat; /* array of patterns for library names */
const char **sympat; /* array of patterns for symbol names */
int nlibpat; /* number of library patterns */
int nsympat; /* number of symbol patterns */
char flag; /* 0 or BPT_HANG */
char exclude_lib; /* if true, exclude these libraries */
char exclude; /* if true, exclude these functions */
char internal; /* if true, trace internal calls */
};
struct callstack {
struct {
} *stack; /* pointer to the call stack info */
};
extern int not_consist; /* used while rebuilding breakpoint table */
extern int delete_library; /* used while rebuilding breakpoint table */
extern int descendent; /* TRUE iff descendent of top level */
extern int is_vfork_child; /* TRUE iff process is a vfork()ed child */
extern int ngrab; /* number of pid's that were grabbed */
extern int data_model; /* PR_MODEL_LP64 or PR_MODEL_ILP32 */
extern long pagesize; /* bytes per page; should be per-process */
extern int exit_called; /* _exit() syscall was seen */
extern int leave_hung; /* if TRUE, leave the process hung */
#ifdef __cplusplus
}
#endif
#endif /* _RAMDATA_H */