FALSE with false throughout.
* basic_blocks.h: Likewise.
* cg_arcs.c: Likewise.
* cg_dfn.c: Likewise.
* cg_print.c: Likewise.
* corefile.c: Likewise.
* gmon_io.c: Likewise.
* gprof.c: Likewise.
* hist.c: Likewise.
* mips.c: Likewise.
* source.c: Likewise.
* source.h: Likewise.
* sym_ids.c: Likewise.
* sym_ids.h: Likewise.
* symtab.h: Likewise.
* tahoe.c: Likewise.
* vax.c: Likewise.
* gprof.h: Likewise.
(TRUE): Don't define.
(FALSE): Don't define.
+2002-02-01 Alan Modra <amodra@bigpond.net.au>
+
+ * basic_blocks.c: Replace bool with boolean, TRUE with true and
+ FALSE with false throughout.
+ * basic_blocks.h: Likewise.
+ * cg_arcs.c: Likewise.
+ * cg_dfn.c: Likewise.
+ * cg_print.c: Likewise.
+ * corefile.c: Likewise.
+ * gmon_io.c: Likewise.
+ * gprof.c: Likewise.
+ * hist.c: Likewise.
+ * mips.c: Likewise.
+ * source.c: Likewise.
+ * source.h: Likewise.
+ * sym_ids.c: Likewise.
+ * sym_ids.h: Likewise.
+ * symtab.h: Likewise.
+ * tahoe.c: Likewise.
+ * vax.c: Likewise.
+ * gprof.h: Likewise.
+ (TRUE): Don't define.
+ (FALSE): Don't define.
+
2002-01-31 Jason R Thorpe <thorpej@wasabisystems.com>
* TODO: Remove "host architecture pointer size" item.
#include "sym_ids.h"
/* Default option values: */
-bool bb_annotate_all_lines = FALSE;
+boolean bb_annotate_all_lines = false;
unsigned long bb_min_calls = 1;
int bb_table_length = 10;
care about anymore. */
if ((fread (&ncalls, sizeof (ncalls), 1, ifp) != 1)
|| (fread (&addr, sizeof (addr), 1, ifp) != 1)
- || (fskip_string (ifp), FALSE)
- || (fskip_string (ifp), FALSE)
+ || (fskip_string (ifp), false)
+ || (fskip_string (ifp), false)
|| (fread (&line_num, sizeof (line_num), 1, ifp) != 1))
{
perror (filename);
}
else
{
- static bool user_warned = FALSE;
+ static boolean user_warned = false;
if (!user_warned)
{
- user_warned = TRUE;
+ user_warned = true;
fprintf (stderr,
_("%s: warning: ignoring basic-block exec counts (use -l or --line)\n"),
whoami);
int i, j, len;
if (first_output)
- first_output = FALSE;
+ first_output = false;
else
printf ("\f\n");
#define basic_blocks_h
/* Options: */
-extern bool bb_annotate_all_lines; /* Force annotation of all lines? */
+extern boolean bb_annotate_all_lines; /* Force annotation of all lines? */
extern int bb_table_length; /* Length of most-used bb table. */
extern unsigned long bb_min_calls; /* Minimum execution count. */
++num;
++cyc;
sym_init (cyc);
- cyc->cg.print_flag = TRUE; /* should this be printed? */
+ cyc->cg.print_flag = true; /* should this be printed? */
cyc->cg.top_order = DFN_NAN; /* graph call chain top-sort order */
cyc->cg.cyc.num = num; /* internal number of cycle on */
cyc->cg.cyc.head = cyc; /* pointer to head of cycle */
if (child == head)
{
/* just a regular child, check its parents: */
- child->cg.print_flag = FALSE;
+ child->cg.print_flag = false;
child->cg.prop.fract = 0.0;
for (arc = child->cg.parents; arc; arc = arc->next_parent)
{
* Its a member of a cycle, look at all parents from outside
* the cycle.
*/
- head->cg.print_flag = FALSE;
+ head->cg.print_flag = false;
head->cg.prop.fract = 0.0;
for (member = head->cg.cyc.next; member; member = member->cg.cyc.next)
{
|| (syms[INCL_GRAPH].len == 0
&& !sym_lookup (&syms[EXCL_GRAPH], child->addr)))
{
- child->cg.print_flag = TRUE;
+ child->cg.print_flag = true;
}
}
else
if (!sym_lookup (&syms[INCL_GRAPH], child->addr)
&& sym_lookup (&syms[EXCL_GRAPH], child->addr))
{
- child->cg.print_flag = FALSE;
+ child->cg.print_flag = false;
}
}
if (child->cg.prop.fract == 0.0)
parent->cg.prop.fract = 0.0;
parent->cg.prop.self = 0.0;
parent->cg.prop.child = 0.0;
- parent->cg.print_flag = FALSE;
+ parent->cg.print_flag = false;
parent->cg.top_order = DFN_NAN;
parent->cg.cyc.num = 0;
parent->cg.cyc.head = parent;
/*
* Is CHILD already numbered?
*/
-static bool
+static boolean
DEFUN (is_numbered, (child), Sym * child)
{
return child->cg.top_order != DFN_NAN && child->cg.top_order != DFN_BUSY;
/*
* Is CHILD already busy?
*/
-static bool
+static boolean
DEFUN (is_busy, (child), Sym * child)
{
if (child->cg.top_order == DFN_NAN)
{
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
DEFUN_VOID (print_header)
{
if (first_output)
- first_output = FALSE;
+ first_output = false;
else
printf ("\f\n");
whoami, bfd_printable_name(core_bfd));
/* Don't give the error more than once. */
- ignore_direct_calls = FALSE;
+ ignore_direct_calls = false;
}
}
/* Get whatever source info we can get regarding address ADDR. */
-static bool
+static boolean
DEFUN (get_src_info, (addr, filename, name, line_num),
bfd_vma addr AND const char **filename AND const char **name
AND int *line_num)
*filename = fname;
*name = func_name;
*line_num = l;
- return TRUE;
+ return true;
}
else
{
DBG (AOUTDEBUG, printf ("[get_src_info] no info for 0x%lx (%s:%d,%s)\n",
(long) addr, fname ? fname : "<unknown>", l,
func_name ? func_name : "<unknown>"));
- return FALSE;
+ return false;
}
}
}
}
- symtab.limit->is_func = TRUE;
- symtab.limit->is_bb_head = TRUE;
+ symtab.limit->is_func = true;
+ symtab.limit->is_bb_head = true;
if (class == 't')
- symtab.limit->is_static = TRUE;
+ symtab.limit->is_static = true;
min_vma = MIN (symtab.limit->addr, min_vma);
max_vma = MAX (symtab.limit->addr, max_vma);
printf (nbbs == 1 ?
_("\t%d basic-block count record\n") :
_("\t%d basic-block count records\n"), nbbs);
- first_output = FALSE;
+ first_output = false;
}
}
int debug_level = 0;
int output_style = 0;
int output_width = 80;
-bool bsd_style_output = FALSE;
-bool demangle = TRUE;
-bool discard_underscores = TRUE;
-bool ignore_direct_calls = FALSE;
-bool ignore_static_funcs = FALSE;
-bool ignore_zeros = TRUE;
-bool line_granularity = FALSE;
-bool print_descriptions = TRUE;
-bool print_path = FALSE;
-bool ignore_non_functions = FALSE;
+boolean bsd_style_output = false;
+boolean demangle = true;
+boolean discard_underscores = true;
+boolean ignore_direct_calls = false;
+boolean ignore_static_funcs = false;
+boolean ignore_zeros = true;
+boolean line_granularity = false;
+boolean print_descriptions = true;
+boolean print_path = false;
+boolean ignore_non_functions = false;
File_Format file_format = FF_AUTO;
-bool first_output = TRUE;
+boolean first_output = true;
char copyright[] =
"@(#) Copyright (c) 1983 Regents of the University of California.\n\
switch (ch)
{
case 'a':
- ignore_static_funcs = TRUE;
+ ignore_static_funcs = true;
break;
case 'A':
if (optarg)
user_specified |= STYLE_ANNOTATED_SOURCE;
break;
case 'b':
- print_descriptions = FALSE;
+ print_descriptions = false;
break;
case 'B':
output_style |= STYLE_CALL_GRAPH;
user_specified |= STYLE_CALL_GRAPH;
break;
case 'c':
- ignore_direct_calls = TRUE;
+ ignore_direct_calls = true;
break;
case 'C':
if (optarg)
#endif /* DEBUG */
break;
case 'D':
- ignore_non_functions = TRUE;
+ ignore_non_functions = true;
break;
case 'E':
sym_id_add (optarg, EXCL_TIME);
sym_id_add (optarg, EXCL_ARCS);
break;
case 'l':
- line_granularity = TRUE;
+ line_granularity = true;
break;
case 'L':
- print_path = TRUE;
+ print_path = true;
break;
case 'm':
bb_min_calls = (unsigned long) strtoul (optarg, (char **) NULL, 10);
}
break;
case 'T':
- bsd_style_output = TRUE;
+ bsd_style_output = true;
break;
case 'v':
/* This output is intended to follow the GNU standards document. */
}
break;
case 'x':
- bb_annotate_all_lines = TRUE;
+ bb_annotate_all_lines = true;
break;
case 'y':
- create_annotation_files = TRUE;
+ create_annotation_files = true;
break;
case 'z':
- ignore_zeros = FALSE;
+ ignore_zeros = false;
break;
case 'Z':
if (optarg)
user_specified |= STYLE_ANNOTATED_SOURCE;
break;
case OPTION_DEMANGLE:
- demangle = TRUE;
+ demangle = true;
if (optarg != NULL)
{
enum demangling_styles style;
}
break;
case OPTION_NO_DEMANGLE:
- demangle = FALSE;
+ demangle = false;
break;
default:
usage (stderr, 1);
#include "bin-bugs.h"
-/*
- * These may already be defined on some systems. We could probably
- * just use the BFD versions of these, since BFD has already dealt
- * with this problem.
- */
-#undef FALSE
-#define FALSE 0
-#undef TRUE
-#define TRUE 1
-
#define STYLE_FLAT_PROFILE (1<<0)
#define STYLE_CALL_GRAPH (1<<1)
#define STYLE_SUMMARY_FILE (1<<2)
/*
* Command-line options:
*/
-extern int debug_level; /* debug level */
+extern int debug_level; /* debug level */
extern int output_style;
-extern int output_width; /* controls column width in index */
-extern bool bsd_style_output; /* as opposed to FSF style output */
-extern bool demangle; /* demangle symbol names? */
-extern bool discard_underscores; /* discard leading underscores? */
-extern bool ignore_direct_calls; /* don't count direct calls */
-extern bool ignore_static_funcs; /* suppress static functions */
-extern bool ignore_zeros; /* ignore unused symbols/files */
-extern bool line_granularity; /* function or line granularity? */
-extern bool print_descriptions; /* output profile description */
-extern bool print_path; /* print path or just filename? */
-extern bool ignore_non_functions;/* Ignore non-function symbols. */
-
-extern File_Format file_format; /* requested file format */
-
-extern bool first_output; /* no output so far? */
+extern int output_width; /* controls column width in index */
+extern boolean bsd_style_output; /* as opposed to FSF style output */
+extern boolean demangle; /* demangle symbol names? */
+extern boolean discard_underscores; /* discard leading underscores? */
+extern boolean ignore_direct_calls; /* don't count direct calls */
+extern boolean ignore_static_funcs; /* suppress static functions */
+extern boolean ignore_zeros; /* ignore unused symbols/files */
+extern boolean line_granularity; /* function or line granularity? */
+extern boolean print_descriptions; /* output profile description */
+extern boolean print_path; /* print path or just filename? */
+extern boolean ignore_non_functions; /* Ignore non-function symbols. */
+
+extern File_Format file_format; /* requested file format */
+
+extern boolean first_output; /* no output so far? */
extern void done PARAMS ((int status));
bfd_vma addr;
if (first_output)
- first_output = FALSE;
+ first_output = false;
else
printf ("\f\n");
unsigned int op;
int offset;
Sym *child;
- static bool inited = FALSE;
+ static boolean inited = false;
if (!inited)
{
- inited = TRUE;
+ inited = true;
sym_init (&indirect_child);
indirect_child.name = _("<indirect child>");
indirect_child.cg.prop.fract = 1.0;
#define EXT_ANNO "-ann" /* Postfix of annotated files. */
/* Default option values. */
-bool create_annotation_files = FALSE;
+boolean create_annotation_files = false;
Search_List src_search_list = {0, 0};
Source_File *first_src_file = 0;
AND void (*annote) PARAMS ((char *buf, int w, int l, void *arg))
AND void *arg)
{
- static bool first_file = TRUE;
+ static boolean first_file = true;
int i, line_num, nread;
- bool new_line;
+ boolean new_line;
char buf[8192];
char fname[PATH_MAX];
char *annotation, *name_only;
sle = 0; /* Don't use search list for absolute paths. */
name_only = 0;
- while (TRUE)
+ while (true)
{
DBG (SRCDEBUG, printf ("[annotate_source]: looking for %s, trying %s\n",
sf->name, fname));
if (ofp == stdout)
{
if (first_file)
- first_file = FALSE;
+ first_file = false;
else
fputc ('\n', ofp);
if (first_output)
- first_output = FALSE;
+ first_output = false;
else
fprintf (ofp, "\f\n");
annotation = xmalloc (max_width + 1);
line_num = 1;
- new_line = TRUE;
+ new_line = true;
while ((nread = fread (buf, 1, sizeof (buf), ifp)) > 0)
{
(*annote) (annotation, max_width, line_num, arg);
fputs (annotation, ofp);
++line_num;
- new_line = FALSE;
+ new_line = false;
}
new_line = (buf[i] == '\n');
Source_File;
/* Options. */
-extern bool create_annotation_files; /* Create annotated output files? */
+extern boolean create_annotation_files; /* Create annotated output files? */
/* List of directories to search for source files. */
extern Search_List src_search_list;
struct sym_id *next;
char *spec; /* Parsing modifies this. */
Table_Id which_table;
- bool has_right;
+ boolean has_right;
struct match
{
{
parse_spec (slash + 1, &id->right.sym);
*slash = '\0';
- id->has_right = TRUE;
+ id->has_right = true;
}
parse_spec (id->spec, &id->left.sym);
/* Return TRUE iff PATTERN matches SYM. */
-static bool
+static boolean
DEFUN (match, (pattern, sym), Sym * pattern AND Sym * sym)
{
- return (pattern->file ? pattern->file == sym->file : TRUE)
- && (pattern->line_num ? pattern->line_num == sym->line_num : TRUE)
+ return (pattern->file ? pattern->file == sym->file : true)
+ && (pattern->line_num ? pattern->line_num == sym->line_num : true)
&& (pattern->name
? strcmp (pattern->name,
sym->name+(discard_underscores && sym->name[0] == '_')) == 0
- : TRUE);
+ : true);
}
static void
DEFUN (extend_match, (m, sym, tab, second_pass),
- struct match *m AND Sym * sym AND Sym_Table * tab AND bool second_pass)
+ struct match *m AND Sym * sym AND Sym_Table * tab AND boolean second_pass)
{
if (m->prev_match != sym - 1)
{
for (id = id_list; id; id = id->next)
{
if (match (&id->left.sym, sym))
- extend_match (&id->left, sym, &syms[id->which_table], FALSE);
+ extend_match (&id->left, sym, &syms[id->which_table], false);
if (id->has_right && match (&id->right.sym, sym))
- extend_match (&id->right, sym, &right_ids, FALSE);
+ extend_match (&id->right, sym, &right_ids, false);
}
}
for (id = id_list; id; id = id->next)
{
if (match (&id->left.sym, sym))
- extend_match (&id->left, sym, &syms[id->which_table], TRUE);
+ extend_match (&id->left, sym, &syms[id->which_table], true);
if (id->has_right && match (&id->right.sym, sym))
- extend_match (&id->right, sym, &right_ids, TRUE);
+ extend_match (&id->right, sym, &right_ids, true);
}
}
time requesting -k a/b. Fortunately, those symbol tables don't get
very big (the user has to type them!), so a linear search is probably
tolerable. */
-bool
+boolean
DEFUN (sym_id_arc_is_present, (symtab, from, to),
Sym_Table * symtab AND Sym * from AND Sym * to)
{
{
if (from->addr >= sym->addr && from->addr <= sym->end_addr
&& arc_lookup (sym, to))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
extern Sym_Table syms[NUM_TABLES];
-extern void sym_id_add PARAMS ((const char *, Table_Id));
-extern void sym_id_parse PARAMS ((void));
-extern bool sym_id_arc_is_present PARAMS ((Sym_Table *, Sym *, Sym *));
+extern void sym_id_add PARAMS ((const char *, Table_Id));
+extern void sym_id_parse PARAMS ((void));
+extern boolean sym_id_arc_is_present PARAMS ((Sym_Table *, Sym *, Sym *));
#endif /* sym_ids_h */
double child_time; /* Cumulative ticks in children. */
int index; /* Index in the graph list. */
int top_order; /* Graph call chain top-sort order. */
- bool print_flag; /* Should this be printed? */
+ boolean print_flag; /* Should this be printed? */
struct
{
double fract; /* What % of time propagates. */
tahoe_operandenum mode;
tahoe_operandenum firstmode;
bfd_vma pc, destpc;
- static bool inited = FALSE;
+ static boolean inited = false;
if (!inited)
{
- inited = TRUE;
+ inited = true;
sym_init (&indirectchild);
indirectchild.cg.prop.fract = 1.0;
indirectchild.cg.cyc.head = &indirectchild;
operandenum mode;
operandenum firstmode;
bfd_vma pc, destpc;
- static bool inited = FALSE;
+ static boolean inited = false;
if (!inited)
{
- inited = TRUE;
+ inited = true;
sym_init (&indirectchild);
indirectchild.cg.prop.fract = 1.0;
indirectchild.cg.cyc.head = &indirectchild;