Commit Graph

204 Commits

Author SHA1 Message Date
Ian Lance Taylor 8c73afb353 Avoid some overflow cases:
* basic_blocks.h (bb_min_calls): Change to unsigned long.
	* call_graph.h (cg_tally): Change count parameter to unsigned
	long.
	* cg_arcs.h (Arc): Change count field to unsigned long.
	(arc_add): Change count parameter to unsigned long.
	* source.h (Source_File): Change ncalls field to unsigned long.
	* symtab.h (Sym): Change fields ncalls, bb_calls, and
	cg.self_calls to unsigned long.
	* Many files: Update accordingly.
1998-08-12 19:06:24 +00:00
Ian Lance Taylor 15ec5eb33b * configure, Makefile.in, aclocal.m4: Rebuild with current tools. 1998-08-12 19:01:16 +00:00
Stan Cox 47f7fb8bb7 (BSD44_FORMAT): Define for cygwin32, win32, mingw32 1998-07-16 18:05:22 +00:00
Ian Lance Taylor 030bf387cc rebuild 1998-06-12 23:41:52 +00:00
Tom Tromey 27a0ce8805 * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
($(PACKAGE).pot): Unconditionally depend on POTFILES.
1998-06-12 22:32:29 +00:00
Jeff Law c8f90c731e * po/Make-in (install-info): New target. 1998-05-11 04:36:09 +00:00
Ian Lance Taylor eb5382d220 remove \f from internationalized string 1998-05-07 16:51:16 +00:00
Ian Lance Taylor ee66b572a8 fix xgettext invocation 1998-05-06 18:16:28 +00:00
Tom Tromey cd39bab023 * gprof.h (_): Undefine BFD's version. 1998-05-06 02:12:27 +00:00
Tom Tromey 64eaad40db * gprof.c (main): Conditionally call setlocale.
* gprof.h: Include <locale.h> if HAVE_LOCALE_H.
	(LC_MESSAGES): Now can be defined even when ENABLE_NLS.
1998-04-29 02:59:28 +00:00
Tom Tromey 5873cbec2b Fixed xgettext invocation in .Sanitize files 1998-04-29 00:11:07 +00:00
Ian Lance Taylor 47cbef8df8 change core.c to corefile.c 1998-04-28 23:53:24 +00:00
Ian Lance Taylor 43870aec5e * corefile.c: Rename from core.c.
* corefile.h: Rename from core.h.
	* Many .c files: Include corefile.h rather than core.h.
	* Makefile.am (sources): Change core.c to corefile.c.
	(noinst_HEADERS): Change core.h to corefile.h.
	($(OBJECTS)): Depend upon corefile.h rather than core.h.
	(corefile.o): Rename target from core.o, depend upon corefile.c.
	* Makefile.in, po/POTFILES.in: Rebuild.
1998-04-28 23:52:20 +00:00
Ian Lance Taylor cc4f98f55e * configure.in: Change version number to 2.9.4
* configure: Rebuild.
1998-04-27 20:50:54 +00:00
Tom Tromey d6f3da9bc4 If xgettext fails, make Sanitize fail 1998-04-23 05:17:30 +00:00
Tom Tromey 3d96e9b4cf .Sanitize now re-computes gettext-related files 1998-04-22 22:40:45 +00:00
Tom Tromey 1158ffaf2a * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). 1998-04-22 22:34:05 +00:00
Ian Lance Taylor 3b4d91a17c tipo 1998-04-22 19:06:34 +00:00
Ian Lance Taylor e33bfde75c fix sanitization for gettext changes 1998-04-22 16:18:07 +00:00
Tom Tromey 16a02269fc * gprof.h: Added includes and defines for gettext.
* configure.in (ALL_LINGUAS): New macro.
	Call CY_GNU_GETTEXT.  Create po/Makefile.in and po/Makefile.
	* acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
	HAVE_LC_MESSAGES): Define.
	* gprof.c (main): Call setlocale, bindtextdomain, textdomain.
	* Makefile.am (SUBDIRS): New macro.
	(INCLUDES): Look in intl dirs for headers.  Define LOCALEDIR.
	(gprof_DEPENDENCIES): Added INTLDEPS.
	(gprof_LDADD): Added INTLLLIBS.
	(POTFILES): New macro.
	(po/POTFILES.in): New target.
	* Many files: Wrap user-visible strings with gettext invocation.
1998-04-22 07:33:42 +00:00
Ian Lance Taylor 0054bb2ad2 From hjl@lucon.org <H.J. Lu>:
* Makefile.am (diststuff): New target.
	* Makefile.in: Rebuild.
1998-04-07 16:44:30 +00:00
Ian Lance Taylor 0d3e84dd92 * configure.in: Set version to 2.9.1.
* configure: Rebuild.
1998-03-30 22:56:58 +00:00
Ian Lance Taylor 6b84886ad5 Fix some gcc -Wall warnings:
* cg_arcs.c (num_cycles): Change to unsigned int.
	(numarcs): Likewise.
	(arc_add): Change maxarcs to unsigned int.
	(cg_assemble): Change index to unsigned int.
	* cg_arcs.h (num_cycles, numarcs): Update declarations.
	* cg_print.c (cg_print): Change index to unsigned int.
	(cg_print_index): Change index, nnames, todo, i, and j to unsigned
	int.
	(cg_print_file_ordering): Change symbol_count and index2 to
	unsigned int.
	* core.c (symbol_map_count): Change to unsigned int.
	(core_create_function_syms): Change j to unsigned int.
	(core_create_line_syms): Add cast to avoid warning.
	* hist.c (hist_assign_samples): Change j to unsigned int.
	(hist_print): Change index to unsigned i nt.  Add cast to avoid
	warning.
	* sym_ids.c (parse_spec): Add casts to avoid warning.
	* symtab.c (symtab_finalize): Change j to unsigned int.
	(sym_lookup): Update printf format strings.
	* symtab.h (Sym_Table): Change len to unsigned int.
	* tahoe.c (tahoe_reladdr): Add casts to avoid warnings.
1998-03-29 04:15:29 +00:00
Ian Lance Taylor e4dee78c68 Add --demangle and --no-demangle options:
* gprof.h (demangle): Declare.
	* gprof.c (demangle): New global variable.
	(OPTION_DEMANGLE, OPTION_NO_DEMANGLE): Define.
	(long_options): Add "demangle" and "no-demangle".
	(usage): Mention --demangle and --no-demangle.
	(main): Handle OPTION_DEMANGLE and OPTION_NO_DEMANGLE.
	* utils.c (print_name_only): Only demangle symbol name if demangle
	is true.
	* gprof.texi (Output Options): Document new options.
1998-03-25 00:06:23 +00:00
Ian Lance Taylor 86884cd14a * Makefile.in: Rebuild with automake 1.2e.
* aclocal.m4, configure: Rebuild with libtool 1.2.
1998-03-21 00:27:12 +00:00
Ian Lance Taylor 6590e0d571 * gprof.c (usage): Update bug-gnu-utils address. 1998-02-12 19:36:41 +00:00
Ian Lance Taylor 641146fe3f * configure, aclocal.m4: Rebuild with new libtool. 1998-02-07 20:43:38 +00:00
Ian Lance Taylor 5587a091de * alpha.c (alpha_Instruction): Use int, not signed. 1998-02-06 17:04:19 +00:00
Jeff Law ed302e5ddf * core.c (core_init): Adding missing "break". 1998-02-06 08:58:31 +00:00
Ian Lance Taylor fa1a1b3235 * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. 1998-02-05 17:50:44 +00:00
Ian Lance Taylor 249da91694 Tue Feb 3 14:25:25 1998 Brent Baccala <baccala@freesoft.org>
* bbconv.pl: New file.
	* Makefile.am (EXTRA_DIST): Add bbconv.pl.
	* Makefile.in: Rebuild.
1998-02-04 00:45:10 +00:00
Ian Lance Taylor e2fd423145 Tue Feb 3 14:25:25 1998 Brent Baccala <baccala@freesoft.org>
* gprof.texi: Extensive additions to document all arguments and
	output formats.
1998-02-04 00:41:51 +00:00
Ian Lance Taylor 7862d7d065 Tue Feb 3 14:25:25 1998 Brent Baccala <baccala@freesoft.org>
* symtab.c (symtab_finalize): Prefer function symbols over line
	symbols.
	(dbg_sym_lookup): Correct debugging messages.

	* gprof.c (main): --sum implies --line.

	* cg_print.c (cg_print): When doing line by line profiling, don't
	use a non-function as a main listing item.

	* call_graph.c (cg_tally): When using line by line profiling, use
 	the function symbol as the child.

	* symtab.h (NBBS): Define.
	(Sym): Add bb_addr and bb_calls fields.
	* basic_blocks.c (bb_read_rec): Save multiple basic blocks per
	symbol.
	(bb_write_blocks): Adjust for multiple basic blocks per symbol.
	(print_exec_counts): Don't check whether a symbol is the start of
	a basic block.  Print all basic blocks for a symbol.
	(annotate_with_count): Rewrite to print all basic block counts and
	to pay attention to width argument.
	(print_annotated_source): Don't check whether symbol is the start
	of a basic block.
1998-02-04 00:30:48 +00:00
Ian Lance Taylor c3de2a19e8 Tue Feb 3 14:25:25 1998 Brent Baccala <baccala@freesoft.org>
Make it possible to build a cross gprof, although a few cases are
	still not handled:
	* configure.in: Don't set MY_TARGET.
	* gprof.h: Don't include MACHINE_H.  Don't define FOPEN_RB or
	FOPEN_WB; just get them from sysdep.h.
	* core.h (min_insn_size, offset_to_code): Declare.
	* core.c (MIN_INSN_SIZE): Don't define.
	(min_insn_size, offset_to_code): New variables.
	(core_init): Initialize min_insn_size and offset_to_code.
	(find_call): New function.
	(core_create_line_syms): Don't use min_dist.  Set is_static in
	pass 2.
	* hist.c (UNITS_TO_CODE): Define.
	* gprof.c (default_excluded_list): Add "__mcount_internal".
	* gmon.h: Change TARGET_alpha to __alpha__.
	* hertz.h: Ifdef MACH, define hertz as HZ.
	* alpha.c (alpha_Instruction): Rename from Instruction.  Change
	all references.
	(alpha_find_call): Rename from find_call.
	* alpha.h: Remove.
	* dummy.c, dummy.h: Remove.
	* i386.c (i386_iscall): Rename from iscall.  Change all
	references.  Check for call instruction, not jump or lcall.
	(i386_find_call): Rename from find_call.  Correct for VMA.
	Correct call destination computation.  Don't dereference symbol if
	it is NULL.
	* i386.h: Remove.
	* ns532.c, ns532.h: Remove.
	* sparc.c (CALL): Define.
	(sparc_find_call): Rename from find_call.
	* sparc.h: Remove.
	* tahoe.c: Include cg_arcs.h, core.h, hist.h, and symtab.h.  Don't
	include time_host.h.
	(CALLF, PC): Define.
	(enum tahoe_opermodes, tahoe_operandenum): Define.  Rename all
	references to opermodes or operandenum to these.
	(tahoe_operandmode): Rename from operandmode.  Call abort if
	switch does not return.
	(tahoe_operandname): Rename from operandname.  Call abort if
	switch does not return.
	(tahoe_operandlength): Rename from operandlength.  Call abort if
	switch does not return.
	(tahoe_reladdr): Rename from reladdr.
	(tahoe_find_call): Rename from find_call.  Use core_text_space
	rather than textspace.
	* tahoe.h: Remove.
	* vax.c (CALLS, PC): Define.
	(enum opermodes, operandenum, struct modebyte): Define.
	(vax_operandmode): Rename from operandmode.  Call abort if switch
	does not return.
	(vax_operandname): Rename from operandname.  Call abort if switch
	does not return.
	(vax_operandlength): Rename from operandlength.  Call abort if
	switch does not return.
	(vax_reladdr): Rename from reladdr.
	(vax_find_call): Rename from find_call.
	* vax.h: Remove.
	* Makefile.am (AUTOMAKE_OPTIONS): Set to cygnus.
	(MY_TARGET): Remove.
	(INCLUDES): Remove -DTARGET_$(MY_TARGET) and -DMACHINE_H=
	\"$(MY_TARGET).h\".
	(gprof_SOURCES): Add i386.c, alpha.c, vax.c, tahoe.c, sparc.c.
	(gprof_DEPENDENCIES): Remove $(MY_TARGET).o.
	(gprof_LDADD): Likewise.
	(noinst_HEADERS): Remove alpha.h, i386.h, ns532.h, sparc.h,
	tahoe.h, vax.h, dummy.h.
	(EXTRA_DIST): Remove alpha.c, i386.c, ns532.c, sparc.c, tahoe.c,
	vax.c, dummy.c.
	($(OBJECTS)): Don't depend upon $(MY_TARGET).h.
	($(MY_TARGET).o): Remove target.
	(i386.o, alpha.o, vax.o, tahoe.o, sparc.o): New targets.
	* configure, Makefile.in, aclocal.m4: Rebuild.
1998-02-03 19:52:41 +00:00
Ian Lance Taylor 08c825f94a tipoes 1998-01-22 02:27:29 +00:00
Ian Lance Taylor a3da1edc5e * core.c (core_sym_class): Treat weak symbols as text symbols.
From Dean Gaudet <dgaudet@arctic.org>.
1997-12-29 11:20:37 +00:00
Ian Lance Taylor 42a6231749 * aclocal.m4: Rebuild with new libtool.
* Makefile.in: Rebuild with current automake.
	* configure: Rebuild.
1997-09-24 15:37:13 +00:00
Felix Lee 3e906c081a sanitization fixes. typoes, missing fences, "start" instead of "end", etc. 1997-09-18 06:03:52 +00:00
Jeff Law c142a1f507 Add missing end itemize. 1997-09-04 19:36:15 +00:00
Ian Lance Taylor 274e44aeeb * configure.in: Change version number to 2.8.2. Call
AM_PROG_LIBTOOL.  Remove shared library handling; now handled by
	libtool.  Add AM_CONFIG_HEADER.  Change AC_PROG_INSTALL to
	AM_PROG_INSTALL.  Add AM_EXEEXT.
	* Makefile.am (LINK): Remove.
	(gprof_LDFLAGS): Remove
	(gprof_DEPENDENCIES): Change libbfd.a to libbfd.la.
	(gprof_LDADD): Likewise.
	($(OBJECTS)): Depend upon gconfig.h and ../bfd/config.h.
	* gprof.h: Undefine PACKAGE and VERSION after including BFD
	sysdep.h file, then include new gconfig.h file.
	* gprof.c (VERSION): Don't define.
	* acconfig.h: New file.
	* stamp-h.in: New file.
	* gconfig.in: New file, created by autoheader.
	* Makefile.in, configure, aclocal.m4: Rebuild.
1997-08-09 20:30:19 +00:00
Ian Lance Taylor c78b9c2511 finish upgrade to automake 1.2 1997-06-30 16:05:51 +00:00
Ian Lance Taylor 50fb79778f * aclocal.m4, configure, Makefile.in: Rebuild with automake 1.2. 1997-06-29 03:21:56 +00:00
Ian Lance Taylor 3b66bca3ba * Makefile.am (INCLUDES): Add -DDEBUG.
* Makefile.in: Rebuild.
1997-06-16 19:32:15 +00:00
Ian Lance Taylor 2f1fec47ae Change to use automake:
* Makefile.am: New file.
	* configure.in: Run AM_INIT_AUTOMAKE, AM_MAINTAINER_MODE, and
	AM_CYGWIN32.
	* aclocal.m4: New file, created by aclocal.
	* Makefile.in: Replace with file created by automake --cygnus.
	* configure: Rebuild.
1997-04-15 18:35:39 +00:00
Ian Lance Taylor 4910935152 * gprof.c (VERSION): Define as "2.8.1". 1997-04-03 18:21:59 +00:00
Ian Lance Taylor d2ee1370c2 * gprof.c (main): Correct copyright message. 1997-03-27 22:18:17 +00:00
Ian Lance Taylor 9537b1d020 * Makefile.in (.c.o): Define TARGET_$(MY_TARGET) when compiling.
* gmon.h: Use bytes counts rather than sizeof in struct raw_phdr
 	and struct raw_arc.
1997-03-24 16:13:38 +00:00
Ian Lance Taylor 7dc37d80ff Mon Mar 17 10:54:47 1997 David Mosberger-Tang <davidm@azstarnet.com>
* cg_arcs.c (arc_add): memset() newly alloced arc to ensure
	all fields are initialized with 0.
1997-03-17 15:55:41 +00:00
Ian Lance Taylor 1eb9fa9eba Sat Mar 15 19:17:31 1997 H.J. Lu <hjl@lucon.org>
* symtab.h (find_call): Declare.
	* cg_arcs.c (cg_assemble): Don't declare find_call.
	* hist.c (scale_and_align_entries): Declare.
1997-03-16 00:18:26 +00:00
Ian Lance Taylor 22395d7ed4 * configure.in: Define BSD44_FORMAT if the target looks like a
BSD4.4 derived system.
	* configure: Rebuild.
	* Makefile.in (.c.o): Add @DEFS@.
	* gmon_io.c (gmon_out_read): In BSD44_FORMAT code, get profrate
	from profrate field, not version field.
1997-02-27 17:49:00 +00:00