Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Binutils.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef symtab_h
#define symtab_h
to map code-addresses into source-code information. Source-code
information can be any combination of: (i) function-name, (ii)
source file-name, and (iii) source line number.
The symbol table is used to map addresses into source-code
information. */
#define NBBS 10
its address, the number of calls and compute its share of cpu time. */
typedef struct sym
{
In the symbol-table, fields ADDR and FUNC_NAME are guaranteed
to contain valid information. FILE may be 0, if unknown and
LINE_NUM maybe 0 if unknown. */
bfd_vma addr;
bfd_vma end_addr;
const char *name;
Source_File *file;
int line_num;
unsigned int
is_func:1,
is_static:1,
is_bb_head:1,
mapped:1,
has_been_placed:1;
unsigned long ncalls;
int nuses;
a particular context. */
bfd_vma bb_addr[NBBS];
unsigned long bb_calls[NBBS];
struct sym *next;
struct sym *prev;
struct
{
double time;
bfd_vma scaled_addr;
}
hist;
struct
{
unsigned long self_calls;
double child_time;
int index;
int top_order;
bfd_boolean print_flag;
struct
{
double fract;
double self;
double child;
}
prop;
struct
{
int num;
struct sym *head;
struct sym *next;
}
cyc;
struct arc *parents;
struct arc *children;
}
cg;
}
Sym;
in increasing order of addresses. */
typedef struct
{
unsigned int len;
Sym *base;
Sym *limit;
}
Sym_Table;
extern Sym_Table symtab;
extern void sym_init (Sym *);
extern void symtab_finalize (Sym_Table *);
#ifdef DEBUG
extern Sym *dbg_sym_lookup (Sym_Table *, bfd_vma);
#endif
extern Sym *sym_lookup (Sym_Table *, bfd_vma);
extern void find_call (Sym *, bfd_vma, bfd_vma);
#endif