* gdb.base/del.c: New file.
[deliverable/binutils-gdb.git] / gprof / source.h
CommitLineData
ef368dac 1/* source.h
0eee5820 2
d6a39701 3 Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
ef368dac
NC
4
5This file is part of GNU Binutils.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
44eb1801 19Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
ef368dac 20\f
252b5132
RH
21#ifndef source_h
22#define source_h
23
252b5132
RH
24typedef struct source_file
25 {
26 struct source_file *next;
ef368dac
NC
27 const char *name; /* Name of source file. */
28 unsigned long ncalls; /* # of "calls" to this file. */
29 int num_lines; /* # of lines in file. */
30 int nalloced; /* Number of lines allocated. */
31 void **line; /* Usage-dependent per-line data. */
252b5132
RH
32 }
33Source_File;
34
ef368dac 35/* Options. */
b34976b6
AM
36
37/* Create annotated output files? */
38extern bfd_boolean create_annotation_files;
252b5132 39
ef368dac 40/* List of directories to search for source files. */
252b5132
RH
41extern Search_List src_search_list;
42
ef368dac 43/* Chain of source-file descriptors. */
252b5132
RH
44extern Source_File *first_src_file;
45
ef368dac 46/* Returns pointer to source file descriptor for PATH/FILENAME. */
3e8f6abf
BE
47extern Source_File *source_file_lookup_path (const char *);
48extern Source_File *source_file_lookup_name (const char *);
ef368dac
NC
49
50/* Read source file SF output annotated source. The annotation is at
51 MAX_WIDTH characters wide and for each source-line an annotation is
52 obtained by invoking function ANNOTE. ARG is an argument passed to
53 ANNOTE that is left uninterpreted by annotate_source().
0eee5820 54
ef368dac
NC
55 Returns a pointer to the output file (which maybe stdout) such
56 that summary statistics can be printed. If the returned file
57 is not stdout, it should be closed when done with it. */
1355568a 58extern FILE *annotate_source
3e8f6abf 59 (Source_File *sf, unsigned int max_width,
1355568a 60 void (*annote) (char *, unsigned int, int, PTR arg),
3e8f6abf 61 PTR arg);
252b5132 62#endif /* source_h */
This page took 0.255074 seconds and 4 git commands to generate.