inside ifdef where they are used.
* core.c (core_sym_class): Parenthesize && within ||.
* symtab.c (symtab_finalize): Correct parenthesization.
* cg_print.h (cg_print_file_ordering): Declare.
(cg_print_function_ordering): Declare.
* __bb_exit_func.c (__bb_exit_func): Replace bcopy with memcpy.
* cg_arcs.c (arc_add): Likewise.
* cg_print.c (cg_print_function_ordering): Likewise.
+Thu Mar 21 17:18:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * core.c (core_create_function_syms): Move filename and func_name
+ inside ifdef where they are used.
+
+ * core.c (core_sym_class): Parenthesize && within ||.
+ * symtab.c (symtab_finalize): Correct parenthesization.
+
+ * cg_print.h (cg_print_file_ordering): Declare.
+ (cg_print_function_ordering): Declare.
+
+ * __bb_exit_func.c (__bb_exit_func): Replace bcopy with memcpy.
+ * cg_arcs.c (arc_add): Likewise.
+ * cg_print.c (cg_print_function_ordering): Likewise.
+
Thu Mar 21 17:02:02 1996 David Mosberger-Tang <davidm@azstarnet.com>
* gprof.c (default_excluded_list): Add "__mcount".
perror(OUT_NAME);
return;
} /* if */
- bcopy(GMON_MAGIC, &ghdr.cookie[0], 4);
- bcopy(&version, &ghdr.version, sizeof(version));
+ memcpy(&ghdr.cookie[0], GMON_MAGIC, 4);
+ memcpy(&ghdr.version, &version, sizeof(version));
fwrite(&ghdr, sizeof(ghdr), 1, fp);
for (ptr = __bb_head; ptr != 0; ptr = ptr->next) {
newarcs = (Arc **)xmalloc(sizeof (Arc *) * maxarcs);
/* Copy the old array's contents into the new array. */
- bcopy (arcs, newarcs, numarcs * sizeof (Arc *));
+ memcpy (newarcs, arcs, numarcs * sizeof (Arc *));
/* Free up the old array. */
free (arcs);
/* Now sort a temporary symbol table based on the number of
times each function was used in the highest used arcs. */
- bcopy (used_syms, scratch_syms, used * sizeof (Sym *));
+ memcpy (scratch_syms, used_syms, used * sizeof (Sym *));
qsort (scratch_syms, used, sizeof (Sym *), cmp_fun_nuses);
/* Now pick out those symbols we're going to emit as
extern void cg_print PARAMS ((Sym ** cg));
extern void cg_print_index PARAMS ((void));
+extern void cg_print_file_ordering PARAMS ((void));
+extern void cg_print_function_ordering PARAMS ((void));
#endif /* cg_print_h */
* other systems. Perhaps it should be made configurable.
*/
sym_prefix = bfd_get_symbol_leading_char (core_bfd);
- if (sym_prefix && sym_prefix != sym->name[0]
+ if ((sym_prefix && sym_prefix != sym->name[0])
/*
* GCC may add special symbols to help gdb figure out the file
* language. We want to ignore these, since sometimes they mask
DEFUN (core_create_function_syms, (core_bfd), bfd * core_bfd)
{
bfd_vma min_vma = ~0, max_vma = 0;
- const char *filename, *func_name;
int class;
long i, j, found, skip;
* labels do not appear in the symbol table info, so this isn't
* necessary.
*/
- if (get_src_info (symtab.limit->addr, &filename, &func_name,
- &symtab.limit->line_num))
- {
- symtab.limit->file = source_file_lookup_path (filename);
-
- if (strcmp (symtab.limit->name, func_name) != 0)
- {
- /*
- * The symbol's address maps to a different name, so
- * it can't be a function-entry point. This happens
- * for labels, for example.
- */
- DBG (AOUTDEBUG,
- printf ("[core_create_function_syms: rej %s (maps to %s)\n",
- symtab.limit->name, func_name));
- continue;
- }
- }
+ {
+ const char *filename, *func_name;
+
+ if (get_src_info (symtab.limit->addr, &filename, &func_name,
+ &symtab.limit->line_num))
+ {
+ symtab.limit->file = source_file_lookup_path (filename);
+
+ if (strcmp (symtab.limit->name, func_name) != 0)
+ {
+ /*
+ * The symbol's address maps to a different name, so
+ * it can't be a function-entry point. This happens
+ * for labels, for example.
+ */
+ DBG (AOUTDEBUG,
+ printf ("[core_create_function_syms: rej %s (maps to %s)\n",
+ symtab.limit->name, func_name));
+ continue;
+ }
+ }
+ }
#endif
symtab.limit->is_func = TRUE;
* symbols (such as __gnu_compiled, __c89_used, etc.).
*/
if ((!src->is_static && dst[-1].is_static)
- || ((src->is_static == dst[-1].is_static) &&
- (src->name[0] != '_' && dst[-1].name[0] == '_')
- || (src->name[0]
- && src->name[1] != '_' && dst[-1].name[1] == '_')))
+ || ((src->is_static == dst[-1].is_static)
+ && ((src->name[0] != '_' && dst[-1].name[0] == '_')
+ || (src->name[0]
+ && src->name[1] != '_' && dst[-1].name[1] == '_'))))
{
DBG (AOUTDEBUG | IDDEBUG,
printf ("[symtab_finalize] favor %s@%c%c over %s@%c%c",