| 1 | /* gmon_io.h
|
|---|
| 2 |
|
|---|
| 3 | Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
|
|---|
| 4 |
|
|---|
| 5 | This file is part of GNU Binutils.
|
|---|
| 6 |
|
|---|
| 7 | This program is free software; you can redistribute it and/or modify
|
|---|
| 8 | it under the terms of the GNU General Public License as published by
|
|---|
| 9 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 10 | (at your option) any later version.
|
|---|
| 11 |
|
|---|
| 12 | This program is distributed in the hope that it will be useful,
|
|---|
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 15 | GNU General Public License for more details.
|
|---|
| 16 |
|
|---|
| 17 | You should have received a copy of the GNU General Public License
|
|---|
| 18 | along with this program; if not, write to the Free Software
|
|---|
| 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|---|
| 20 | |
|---|
| 21 |
|
|---|
| 22 | #ifndef gmon_io_h
|
|---|
| 23 | #define gmon_io_h
|
|---|
| 24 |
|
|---|
| 25 | /* Some platforms need to put stdin into binary mode, to read
|
|---|
| 26 | binary files. */
|
|---|
| 27 | #include "sysdep.h"
|
|---|
| 28 | #ifdef HAVE_SETMODE
|
|---|
| 29 | #ifndef O_BINARY
|
|---|
| 30 | #ifdef _O_BINARY
|
|---|
| 31 | #define O_BINARY _O_BINARY
|
|---|
| 32 | #define setmode _setmode
|
|---|
| 33 | #else
|
|---|
| 34 | #define O_BINARY 0
|
|---|
| 35 | #endif
|
|---|
| 36 | #endif
|
|---|
| 37 | #if O_BINARY
|
|---|
| 38 | #include <io.h>
|
|---|
| 39 | #define SET_BINARY(f) do { if (!isatty(f)) setmode(f,O_BINARY); } while (0)
|
|---|
| 40 | #endif
|
|---|
| 41 | #endif
|
|---|
| 42 |
|
|---|
| 43 | #define INPUT_HISTOGRAM (1 << 0)
|
|---|
| 44 | #define INPUT_CALL_GRAPH (1 << 1)
|
|---|
| 45 | #define INPUT_BB_COUNTS (1 << 2)
|
|---|
| 46 |
|
|---|
| 47 | extern int gmon_input; /* What input did we see? */
|
|---|
| 48 | extern int gmon_file_version; /* File version are we dealing with. */
|
|---|
| 49 |
|
|---|
| 50 | extern int gmon_io_read_vma PARAMS ((FILE *ifp, bfd_vma *valp));
|
|---|
| 51 | extern int gmon_io_read_32 PARAMS ((FILE *ifp, unsigned int *valp));
|
|---|
| 52 | extern int gmon_io_read PARAMS ((FILE *ifp, char *buf, size_t n));
|
|---|
| 53 | extern int gmon_io_write_vma PARAMS ((FILE *ifp, bfd_vma val));
|
|---|
| 54 | extern int gmon_io_write_32 PARAMS ((FILE *ifp, unsigned int val));
|
|---|
| 55 | extern int gmon_io_write_8 PARAMS ((FILE *ifp, unsigned int val));
|
|---|
| 56 | extern int gmon_io_write PARAMS ((FILE *ifp, char *buf, size_t n));
|
|---|
| 57 |
|
|---|
| 58 | extern void gmon_out_read PARAMS ((const char *));
|
|---|
| 59 | extern void gmon_out_write PARAMS ((const char *));
|
|---|
| 60 |
|
|---|
| 61 | #endif /* gmon_io_h */
|
|---|