17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 56fced65dSraf * Common Development and Distribution License (the "License"). 66fced65dSraf * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 2153e568b1Sraf 227c478bd9Sstevel@tonic-gate /* 23*134a1f4eSCasper H.S. Dik * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 277c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifndef _RAMDATA_H 307c478bd9Sstevel@tonic-gate #define _RAMDATA_H 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate /* 377c478bd9Sstevel@tonic-gate * ramdata.h -- read/write data declarations. 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #include <errno.h> 417c478bd9Sstevel@tonic-gate #include <signal.h> 427c478bd9Sstevel@tonic-gate #include <synch.h> 437c478bd9Sstevel@tonic-gate #include <thread.h> 447c478bd9Sstevel@tonic-gate #include <thread_db.h> 457c478bd9Sstevel@tonic-gate #include "htbl.h" 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate /* 487c478bd9Sstevel@tonic-gate * Set type for possible filedescriptors. 497c478bd9Sstevel@tonic-gate */ 507c478bd9Sstevel@tonic-gate #define NOFILES_MAX (64 * 1024) 517c478bd9Sstevel@tonic-gate typedef struct { 527c478bd9Sstevel@tonic-gate uint32_t word[(NOFILES_MAX+31)/32]; 537c478bd9Sstevel@tonic-gate } fileset_t; 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate /* 567c478bd9Sstevel@tonic-gate * Previous stop state enumeration (used by signalled() and requested()). 577c478bd9Sstevel@tonic-gate */ 587c478bd9Sstevel@tonic-gate #define SLEEPING 1 597c478bd9Sstevel@tonic-gate #define JOBSIG 2 607c478bd9Sstevel@tonic-gate #define JOBSTOP 3 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate /* 637c478bd9Sstevel@tonic-gate * Simple convenience. 647c478bd9Sstevel@tonic-gate */ 657c478bd9Sstevel@tonic-gate #ifdef TRUE 667c478bd9Sstevel@tonic-gate #undef TRUE 677c478bd9Sstevel@tonic-gate #endif 687c478bd9Sstevel@tonic-gate #ifdef FALSE 697c478bd9Sstevel@tonic-gate #undef FALSE 707c478bd9Sstevel@tonic-gate #endif 717c478bd9Sstevel@tonic-gate #define TRUE 1 727c478bd9Sstevel@tonic-gate #define FALSE 0 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate /* 757c478bd9Sstevel@tonic-gate * Definition of private data. See get_private(). 767c478bd9Sstevel@tonic-gate */ 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate #define IOBSIZE 12 /* number of bytes shown by prt_iob() */ 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate #define CACHE_LN_SZ 64 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate typedef struct private { 837c478bd9Sstevel@tonic-gate struct ps_lwphandle *Lwp; /* non-NULL for each lwp controller */ 847c478bd9Sstevel@tonic-gate const lwpstatus_t *lwpstat; /* lwp status information while stopped */ 857c478bd9Sstevel@tonic-gate int length; /* length of printf() output so far */ 867c478bd9Sstevel@tonic-gate pid_t child; /* pid of fork()ed child process */ 877c478bd9Sstevel@tonic-gate char pname[32]; /* formatted pid/tid of controlled lwp */ 887c478bd9Sstevel@tonic-gate struct { /* remembered parameters for make_pname() */ 897c478bd9Sstevel@tonic-gate int ff; 907c478bd9Sstevel@tonic-gate int lf; 917c478bd9Sstevel@tonic-gate pid_t pid; 927c478bd9Sstevel@tonic-gate id_t lwpid; 937c478bd9Sstevel@tonic-gate id_t tid; 947c478bd9Sstevel@tonic-gate } pparam; 957c478bd9Sstevel@tonic-gate int Errno; /* errno for controlled process's syscall */ 967c478bd9Sstevel@tonic-gate int ErrPriv; /* privilege missing for last syscall */ 977c478bd9Sstevel@tonic-gate long Rval1; /* rval1 (%r0) for syscall */ 987c478bd9Sstevel@tonic-gate long Rval2; /* rval2 (%r1) for syscall */ 997c478bd9Sstevel@tonic-gate timestruc_t syslast; /* most recent value of stime */ 1007c478bd9Sstevel@tonic-gate timestruc_t usrlast; /* most recent value of utime */ 1017c478bd9Sstevel@tonic-gate long sys_args[9]; /* the arguments to the last syscall */ 1027c478bd9Sstevel@tonic-gate int sys_nargs; /* number of arguments to the last syscall */ 1037c478bd9Sstevel@tonic-gate int sys_indirect; /* if TRUE, this is an indirect system call */ 1047c478bd9Sstevel@tonic-gate char sys_name[12]; /* name of unknown system call */ 1057c478bd9Sstevel@tonic-gate char raw_sig_name[SIG2STR_MAX+4]; /* name of known signal */ 1067c478bd9Sstevel@tonic-gate char sig_name[12]; /* name of unknown signal */ 1077c478bd9Sstevel@tonic-gate char flt_name[12]; /* name of unknown fault */ 1088fd04b83SRoger A. Faulkner char *sys_path; /* pathname given to syscall */ 1097c478bd9Sstevel@tonic-gate size_t sys_psize; /* sizeof(*sys_path) */ 1107c478bd9Sstevel@tonic-gate int sys_valid; /* pathname was fetched and is valid */ 1117c478bd9Sstevel@tonic-gate char *sys_string; /* buffer for formatted syscall string */ 1127c478bd9Sstevel@tonic-gate size_t sys_ssize; /* sizeof(*sys_string) */ 1137c478bd9Sstevel@tonic-gate size_t sys_leng; /* strlen(sys_string) */ 1147c478bd9Sstevel@tonic-gate char *exec_string; /* copy of sys_string for exec() only */ 1157c478bd9Sstevel@tonic-gate char exec_pname[32]; /* formatted pid for exec() only */ 1167c478bd9Sstevel@tonic-gate id_t exec_lwpid; /* lwpid that performed the exec */ 1177c478bd9Sstevel@tonic-gate char *str_buffer; /* fetchstring() buffer */ 1187c478bd9Sstevel@tonic-gate size_t str_bsize; /* sizeof(*str_buffer) */ 1197c478bd9Sstevel@tonic-gate char iob_buf[2*IOBSIZE+8]; /* where prt_iob() leaves its stuff */ 1207c478bd9Sstevel@tonic-gate char code_buf[160]; /* for symbolic arguments, e.g., ioctl codes */ 1217c478bd9Sstevel@tonic-gate int recur; /* show_strioctl() -- to prevent recursion */ 1227c478bd9Sstevel@tonic-gate int seconds; /* seconds, fraction for timestamps */ 1237c478bd9Sstevel@tonic-gate int fraction; /* fraction in 1/10 milliseconds */ 1247c478bd9Sstevel@tonic-gate } private_t; 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate extern thread_key_t private_key; /* set by thr_keycreate() */ 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate extern char *command; /* name of command ("truss") */ 1297c478bd9Sstevel@tonic-gate extern int interrupt; /* interrupt signal was received */ 1307c478bd9Sstevel@tonic-gate extern int sigusr1; /* received SIGUSR1 (release process) */ 1317c478bd9Sstevel@tonic-gate extern int sfd; /* file descriptor to shared tmp file */ 1327c478bd9Sstevel@tonic-gate extern pid_t created; /* if process was created, its process id */ 1337c478bd9Sstevel@tonic-gate extern uid_t Euid; /* truss's effective uid */ 1347c478bd9Sstevel@tonic-gate extern uid_t Egid; /* truss's effective gid */ 1357c478bd9Sstevel@tonic-gate extern uid_t Ruid; /* truss's real uid */ 1367c478bd9Sstevel@tonic-gate extern uid_t Rgid; /* truss's real gid */ 1377c478bd9Sstevel@tonic-gate extern prcred_t credentials; /* traced process credentials */ 138*134a1f4eSCasper H.S. Dik extern prpriv_t *privdata; /* traced process privileges */ 1397c478bd9Sstevel@tonic-gate extern int istty; /* TRUE iff output is a tty */ 1407c478bd9Sstevel@tonic-gate extern time_t starttime; /* start time */ 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate extern int Fflag; /* option flags from getopt() */ 1437c478bd9Sstevel@tonic-gate extern int fflag; 1447c478bd9Sstevel@tonic-gate extern int cflag; 1457c478bd9Sstevel@tonic-gate extern int aflag; 1467c478bd9Sstevel@tonic-gate extern int eflag; 1477c478bd9Sstevel@tonic-gate extern int iflag; 1487c478bd9Sstevel@tonic-gate extern int lflag; 1497c478bd9Sstevel@tonic-gate extern int tflag; 1507c478bd9Sstevel@tonic-gate extern int pflag; 1517c478bd9Sstevel@tonic-gate extern int sflag; 1527c478bd9Sstevel@tonic-gate extern int mflag; 1537c478bd9Sstevel@tonic-gate extern int oflag; 1547c478bd9Sstevel@tonic-gate extern int vflag; 1557c478bd9Sstevel@tonic-gate extern int xflag; 1567c478bd9Sstevel@tonic-gate extern int hflag; 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate extern int dflag; 1597c478bd9Sstevel@tonic-gate extern int Dflag; 1607c478bd9Sstevel@tonic-gate extern int Eflag; 1617c478bd9Sstevel@tonic-gate extern int Tflag; 1627c478bd9Sstevel@tonic-gate extern int Sflag; 1637c478bd9Sstevel@tonic-gate extern int Mflag; 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gate extern sysset_t trace; /* sys calls to trace */ 1667c478bd9Sstevel@tonic-gate extern sysset_t traceeven; /* sys calls to trace even if not reported */ 1677c478bd9Sstevel@tonic-gate extern sysset_t verbose; /* sys calls to be verbose about */ 1687c478bd9Sstevel@tonic-gate extern sysset_t rawout; /* sys calls to show in raw mode */ 1697c478bd9Sstevel@tonic-gate extern sigset_t signals; /* signals to trace */ 1707c478bd9Sstevel@tonic-gate extern fltset_t faults; /* faults to trace */ 1717c478bd9Sstevel@tonic-gate extern fileset_t readfd; /* read() file descriptors to dump */ 1727c478bd9Sstevel@tonic-gate extern fileset_t writefd; /* write() file descriptors to dump */ 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate #pragma align CACHE_LN_SZ(truss_lock, count_lock) 1757c478bd9Sstevel@tonic-gate extern mutex_t truss_lock; /* protects almost everything */ 1767c478bd9Sstevel@tonic-gate extern cond_t truss_cv; /* condition variable associated w truss_lock */ 1777c478bd9Sstevel@tonic-gate extern mutex_t count_lock; /* lock protecting count struct Cp */ 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate extern htbl_t *fcall_tbl; /* function call hash table (per-proc) */ 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate extern int truss_nlwp; /* number of truss lwps */ 1827c478bd9Sstevel@tonic-gate extern int truss_maxlwp; /* number of entries in truss_lwpid */ 1837c478bd9Sstevel@tonic-gate extern lwpid_t *truss_lwpid; /* array of truss lwpid's */ 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gate struct syscount { 1877c478bd9Sstevel@tonic-gate long count; /* system call count */ 1887c478bd9Sstevel@tonic-gate long error; /* system call errors */ 1897c478bd9Sstevel@tonic-gate timestruc_t stime; /* time spent in system call */ 1907c478bd9Sstevel@tonic-gate }; 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate struct counts { /* structure for keeping counts */ 1937c478bd9Sstevel@tonic-gate long sigcount[PRMAXSIG+1]; /* signals count [0..PRMAXSIG] */ 1947c478bd9Sstevel@tonic-gate long fltcount[PRMAXFAULT+1]; /* faults count [0..MAXFAULT] */ 1957c478bd9Sstevel@tonic-gate struct syscount *syscount[PRMAXSYS+1]; 1967c478bd9Sstevel@tonic-gate timestruc_t systotal; /* total time spent in kernel */ 1977c478bd9Sstevel@tonic-gate timestruc_t usrtotal; /* total time spent in user mode */ 1987c478bd9Sstevel@tonic-gate timestruc_t basetime; /* base time for timestamps */ 1997c478bd9Sstevel@tonic-gate }; 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gate struct global_psinfo { 2027c478bd9Sstevel@tonic-gate mutex_t fork_lock; /* protects list of truss pids */ 2037c478bd9Sstevel@tonic-gate cond_t fork_cv; 2047c478bd9Sstevel@tonic-gate char p1[CACHE_LN_SZ - (sizeof (mutex_t) + sizeof (cond_t))]; 2057c478bd9Sstevel@tonic-gate mutex_t ps_mutex0; /* see ipc.c:Ecritical */ 2067c478bd9Sstevel@tonic-gate char p2[CACHE_LN_SZ - sizeof (mutex_t)]; 2077c478bd9Sstevel@tonic-gate mutex_t ps_mutex1; /* see ipc.c:Ecritical */ 2087c478bd9Sstevel@tonic-gate char p3[CACHE_LN_SZ - sizeof (mutex_t)]; 2097c478bd9Sstevel@tonic-gate pid_t fork_pid; 2107c478bd9Sstevel@tonic-gate pid_t tpid[1000]; /* truss process pid */ 2117c478bd9Sstevel@tonic-gate pid_t spid[1000]; /* subject process pid */ 2127c478bd9Sstevel@tonic-gate const char *lwps[1000]; /* optional lwp list */ 2137c478bd9Sstevel@tonic-gate }; 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gate extern struct counts *Cp; /* for counting: malloc() or shared memory */ 2167c478bd9Sstevel@tonic-gate extern struct global_psinfo *gps; /* ptr to global_psinfo struct */ 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate struct bkpt { /* to describe one function's entry point */ 2197c478bd9Sstevel@tonic-gate struct bkpt *next; /* hash table linked list */ 2207c478bd9Sstevel@tonic-gate char *sym_name; /* function name */ 2217c478bd9Sstevel@tonic-gate struct dynlib *dyn; /* enclosing library */ 2227c478bd9Sstevel@tonic-gate uintptr_t addr; /* function address, breakpointed */ 2237c478bd9Sstevel@tonic-gate ulong_t instr; /* original instruction at addr */ 2247c478bd9Sstevel@tonic-gate int flags; /* see below */ 2257c478bd9Sstevel@tonic-gate }; 2267c478bd9Sstevel@tonic-gate #define BPT_HANG 0x01 /* leave stopped and abandoned when called */ 2277c478bd9Sstevel@tonic-gate #define BPT_EXCLUDE 0x02 /* function found but is being excluded */ 2287c478bd9Sstevel@tonic-gate #define BPT_INTERNAL 0x04 /* trace internal calls on this function */ 2297c478bd9Sstevel@tonic-gate #define BPT_ACTIVE 0x08 /* function breakpoint is set in process */ 2307c478bd9Sstevel@tonic-gate #define BPT_PREINIT 0x10 /* PREINIT event in ld.so.1 */ 2317c478bd9Sstevel@tonic-gate #define BPT_POSTINIT 0x20 /* POSTINIT event in ld.so.1 */ 2327c478bd9Sstevel@tonic-gate #define BPT_DLACTIVITY 0x40 /* DLACTIVITY event in ld.so.1 */ 2337c478bd9Sstevel@tonic-gate #define BPT_TD_CREATE 0x80 /* TD_CREATE threading event */ 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate struct dynlib { /* structure for tracing functions */ 2367c478bd9Sstevel@tonic-gate struct dynlib *next; 2377c478bd9Sstevel@tonic-gate char *lib_name; /* full library name */ 2387c478bd9Sstevel@tonic-gate char *match_name; /* library name used in name matching */ 2397c478bd9Sstevel@tonic-gate char *prt_name; /* library name for printing */ 2407c478bd9Sstevel@tonic-gate int built; /* if true, bkpt list has been built */ 2416fced65dSraf int present; /* true if library is still present */ 2427c478bd9Sstevel@tonic-gate uintptr_t base; /* library's mapping base */ 2437c478bd9Sstevel@tonic-gate size_t size; /* library's mapping size */ 2447c478bd9Sstevel@tonic-gate }; 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate struct dynpat { /* structure specifying patterns for dynlib's */ 2477c478bd9Sstevel@tonic-gate struct dynpat *next; 2487c478bd9Sstevel@tonic-gate const char **libpat; /* array of patterns for library names */ 2497c478bd9Sstevel@tonic-gate const char **sympat; /* array of patterns for symbol names */ 2507c478bd9Sstevel@tonic-gate int nlibpat; /* number of library patterns */ 2517c478bd9Sstevel@tonic-gate int nsympat; /* number of symbol patterns */ 2527c478bd9Sstevel@tonic-gate char flag; /* 0 or BPT_HANG */ 2537c478bd9Sstevel@tonic-gate char exclude_lib; /* if true, exclude these libraries */ 2547c478bd9Sstevel@tonic-gate char exclude; /* if true, exclude these functions */ 2557c478bd9Sstevel@tonic-gate char internal; /* if true, trace internal calls */ 2567c478bd9Sstevel@tonic-gate struct dynlib *Dp; /* set to the dynlib instance when searching */ 2577c478bd9Sstevel@tonic-gate }; 2587c478bd9Sstevel@tonic-gate 259186f7fbfSEdward Pilatowicz extern struct dynlib *Dynlib; /* for tracing functions in shared libraries */ 2607c478bd9Sstevel@tonic-gate extern struct dynpat *Dynpat; 2617c478bd9Sstevel@tonic-gate extern struct dynpat *Lastpat; 2627c478bd9Sstevel@tonic-gate extern struct bkpt **bpt_hashtable; /* breakpoint hash table */ 2637c478bd9Sstevel@tonic-gate extern uint_t nthr_create; /* number of thr_create() calls seen so far */ 2647c478bd9Sstevel@tonic-gate 2657c478bd9Sstevel@tonic-gate struct callstack { 2667c478bd9Sstevel@tonic-gate struct callstack *next; 2677c478bd9Sstevel@tonic-gate uintptr_t stkbase; /* stkbase < stkend */ 2687c478bd9Sstevel@tonic-gate uintptr_t stkend; /* stkend == base + size */ 2697c478bd9Sstevel@tonic-gate prgreg_t tref; /* %g7 (sparc) or %gs (intel) */ 2707c478bd9Sstevel@tonic-gate id_t tid; /* thread-id */ 2717c478bd9Sstevel@tonic-gate uint_t nthr_create; /* value of nthr_create last time we looked */ 2727c478bd9Sstevel@tonic-gate uint_t ncall; /* number of elements in stack */ 2737c478bd9Sstevel@tonic-gate uint_t maxcall; /* max elements in stack (malloc'd) */ 2747c478bd9Sstevel@tonic-gate struct { 2757c478bd9Sstevel@tonic-gate uintptr_t sp; /* %sp for function call */ 2767c478bd9Sstevel@tonic-gate uintptr_t pc; /* value of the return %pc */ 2777c478bd9Sstevel@tonic-gate struct bkpt *fcn; /* name of function called */ 2787c478bd9Sstevel@tonic-gate } *stack; /* pointer to the call stack info */ 2797c478bd9Sstevel@tonic-gate }; 2807c478bd9Sstevel@tonic-gate 2817c478bd9Sstevel@tonic-gate extern struct callstack *callstack; /* the callstack list */ 2827c478bd9Sstevel@tonic-gate extern uint_t nstack; /* number of detected stacks */ 2837c478bd9Sstevel@tonic-gate extern rd_agent_t *Rdb_agent; /* run-time linker debug handle */ 2847c478bd9Sstevel@tonic-gate extern td_thragent_t *Thr_agent; /* thread debug handle */ 2857c478bd9Sstevel@tonic-gate extern int not_consist; /* used while rebuilding breakpoint table */ 2866fced65dSraf extern int delete_library; /* used while rebuilding breakpoint table */ 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate extern pid_t ancestor; /* top-level parent process id */ 2897c478bd9Sstevel@tonic-gate extern int descendent; /* TRUE iff descendent of top level */ 2907c478bd9Sstevel@tonic-gate extern int is_vfork_child; /* TRUE iff process is a vfork()ed child */ 2917c478bd9Sstevel@tonic-gate 2927c478bd9Sstevel@tonic-gate extern int ngrab; /* number of pid's that were grabbed */ 2937c478bd9Sstevel@tonic-gate 2947c478bd9Sstevel@tonic-gate extern struct ps_prochandle *Proc; /* global reference to process */ 2957c478bd9Sstevel@tonic-gate extern int data_model; /* PR_MODEL_LP64 or PR_MODEL_ILP32 */ 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gate extern long pagesize; /* bytes per page; should be per-process */ 2987c478bd9Sstevel@tonic-gate 2997c478bd9Sstevel@tonic-gate extern int exit_called; /* _exit() syscall was seen */ 3007c478bd9Sstevel@tonic-gate 3017c478bd9Sstevel@tonic-gate extern lwpid_t primary_lwp; /* representative lwp on process grab */ 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gate extern sysset_t syshang; /* sys calls to make process hang */ 3047c478bd9Sstevel@tonic-gate extern sigset_t sighang; /* signals to make process hang */ 3057c478bd9Sstevel@tonic-gate extern fltset_t flthang; /* faults to make process hang */ 3067c478bd9Sstevel@tonic-gate 30753e568b1Sraf extern sigset_t emptyset; /* no signals, for thr_sigsetmask() */ 30853e568b1Sraf extern sigset_t fillset; /* all signals, for thr_sigsetmask() */ 30953e568b1Sraf 3107c478bd9Sstevel@tonic-gate extern int leave_hung; /* if TRUE, leave the process hung */ 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate 3137c478bd9Sstevel@tonic-gate #ifdef __cplusplus 3147c478bd9Sstevel@tonic-gate } 3157c478bd9Sstevel@tonic-gate #endif 3167c478bd9Sstevel@tonic-gate 3177c478bd9Sstevel@tonic-gate #endif /* _RAMDATA_H */ 318