10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 53731Srie * Common Development and Distribution License (the "License"). 63731Srie * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 21*12927SRod.Evans@Sun.COM 220Sstevel@tonic-gate /* 23*12927SRod.Evans@Sun.COM * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate #ifndef WHO_DOT_H 260Sstevel@tonic-gate #define WHO_DOT_H 270Sstevel@tonic-gate 280Sstevel@tonic-gate #include <link.h> 290Sstevel@tonic-gate #include <sys/regset.h> 300Sstevel@tonic-gate #include <sys/frame.h> 310Sstevel@tonic-gate #include <sys/elf.h> 320Sstevel@tonic-gate 330Sstevel@tonic-gate #if defined(__sparcv9) 340Sstevel@tonic-gate #define Elf_Ehdr Elf64_Ehdr 350Sstevel@tonic-gate #define Elf_Phdr Elf64_Phdr 360Sstevel@tonic-gate #define Elf_Shdr Elf64_Shdr 370Sstevel@tonic-gate #define Elf_Sym Elf64_Sym 380Sstevel@tonic-gate #define elf_getshdr elf64_getshdr 390Sstevel@tonic-gate #else 400Sstevel@tonic-gate #define Elf_Ehdr Elf32_Ehdr 410Sstevel@tonic-gate #define Elf_Phdr Elf32_Phdr 420Sstevel@tonic-gate #define Elf_Shdr Elf32_Shdr 430Sstevel@tonic-gate #define Elf_Sym Elf32_Sym 440Sstevel@tonic-gate #define elf_getshdr elf32_getshdr 450Sstevel@tonic-gate #endif 460Sstevel@tonic-gate 470Sstevel@tonic-gate 480Sstevel@tonic-gate typedef struct objinfo { 490Sstevel@tonic-gate caddr_t o_lpc; /* low PC */ 500Sstevel@tonic-gate caddr_t o_hpc; /* high PC */ 510Sstevel@tonic-gate int o_fd; /* file descriptor */ 52642Sseizo Elf *o_elf; /* Elf pointer */ 53642Sseizo Elf_Sym *o_syms; /* symbol table */ 540Sstevel@tonic-gate uint_t o_symcnt; /* # of symbols */ 55642Sseizo const char *o_strs; /* symbol string table */ 56642Sseizo Link_map *o_lmp; 570Sstevel@tonic-gate uint_t o_flags; 58642Sseizo struct objinfo *o_next; 590Sstevel@tonic-gate } Objinfo; 600Sstevel@tonic-gate 610Sstevel@tonic-gate #define FLG_OB_NOSYMS 0x0001 /* no symbols available for obj */ 620Sstevel@tonic-gate #define FLG_OB_FIXED 0x0002 /* fixed address object */ 630Sstevel@tonic-gate 640Sstevel@tonic-gate 653731Srie #if defined(__sparc) 66642Sseizo #if defined(__GNUC__) 67642Sseizo #define FLUSHWIN() __asm__("ta 3"); 68642Sseizo #else /* !__GNUC__ */ 690Sstevel@tonic-gate #define FLUSHWIN() asm("ta 3"); 70642Sseizo #endif 710Sstevel@tonic-gate #endif 720Sstevel@tonic-gate 733731Srie #if defined(__x86) 740Sstevel@tonic-gate #define FLUSHWIN() 750Sstevel@tonic-gate #endif 760Sstevel@tonic-gate 770Sstevel@tonic-gate #ifndef STACK_BIAS 780Sstevel@tonic-gate #define STACK_BIAS 0 790Sstevel@tonic-gate #endif 800Sstevel@tonic-gate 810Sstevel@tonic-gate #endif /* WHO_DOT_H */ 82