Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain Import binutils 2.11.2.



details:   https://anonhg.NetBSD.org/src/rev/7f969d4b6350
branches:  trunk
changeset: 513792:7f969d4b6350
user:      tv <tv%NetBSD.org@localhost>
date:      Tue Aug 14 02:57:43 2001 +0000

description:
Import binutils 2.11.2.

diffstat:

 gnu/dist/toolchain/gprof/ChangeLog                          |    91 +-
 gnu/dist/toolchain/gprof/acconfig.h                         |     2 +
 gnu/dist/toolchain/gprof/basic_blocks.c                     |   107 +-
 gnu/dist/toolchain/gprof/basic_blocks.h                     |     2 +-
 gnu/dist/toolchain/gprof/bb_exit_func.c                     |    94 +-
 gnu/dist/toolchain/gprof/bbconv.pl                          |    19 +
 gnu/dist/toolchain/gprof/call_graph.c                       |    30 +-
 gnu/dist/toolchain/gprof/call_graph.h                       |     4 +-
 gnu/dist/toolchain/gprof/cg_arcs.c                          |     4 +-
 gnu/dist/toolchain/gprof/cg_print.c                         |   142 +-
 gnu/dist/toolchain/gprof/cg_print.h                         |     4 +-
 gnu/dist/toolchain/gprof/configure                          |   366 +-
 gnu/dist/toolchain/gprof/configure.in                       |    32 +-
 gnu/dist/toolchain/gprof/corefile.h                         |     4 +-
 gnu/dist/toolchain/gprof/gconfig.in                         |    18 +-
 gnu/dist/toolchain/gprof/gmon_io.h                          |    14 +-
 gnu/dist/toolchain/gprof/gmon_out.h                         |    30 +-
 gnu/dist/toolchain/gprof/gprof.c                            |    10 +-
 gnu/dist/toolchain/gprof/gprof.texi                         |     2 +
 gnu/dist/toolchain/gprof/hist.c                             |   204 +-
 gnu/dist/toolchain/gprof/hist.h                             |     4 +-
 gnu/dist/toolchain/gprof/i386.c                             |     4 +-
 gnu/dist/toolchain/gprof/search_list.c                      |     6 +-
 gnu/dist/toolchain/gprof/search_list.h                      |     4 +-
 gnu/dist/toolchain/gprof/source.c                           |    34 +-
 gnu/dist/toolchain/gprof/source.h                           |     6 +-
 gnu/dist/toolchain/gprof/sym_ids.c                          |    44 +-
 gnu/dist/toolchain/gprof/sym_ids.h                          |     4 +-
 gnu/dist/toolchain/gprof/symtab.c                           |    30 +-
 gnu/dist/toolchain/gprof/symtab.h                           |    10 +-
 gnu/dist/toolchain/gprof/tahoe.c                            |     4 +-
 gnu/dist/toolchain/gprof/utils.c                            |     5 +-
 gnu/dist/toolchain/gprof/vax.c                              |     4 +-
 gnu/dist/toolchain/ld/ChangeLog                             |   139 +-
 gnu/dist/toolchain/ld/configure.in                          |     5 +-
 gnu/dist/toolchain/ld/deffile.h                             |     2 +-
 gnu/dist/toolchain/ld/deffilep.y                            |     2 +-
 gnu/dist/toolchain/ld/emulparams/elf32ltsmip.sh             |    31 +
 gnu/dist/toolchain/ld/emulparams/elf64btsmip.sh             |    44 +
 gnu/dist/toolchain/ld/emulparams/elf64ltsmip.sh             |    44 +
 gnu/dist/toolchain/ld/emulparams/elf_x86_64.sh              |     6 +-
 gnu/dist/toolchain/ld/emultempl/aix.em                      |     4 +-
 gnu/dist/toolchain/ld/emultempl/armcoff.em                  |     2 +-
 gnu/dist/toolchain/ld/emultempl/armelf.em                   |     2 +-
 gnu/dist/toolchain/ld/emultempl/armelf_oabi.em              |     2 +-
 gnu/dist/toolchain/ld/emultempl/beos.em                     |     4 +-
 gnu/dist/toolchain/ld/emultempl/elf32.em                    |    63 +-
 gnu/dist/toolchain/ld/emultempl/generic.em                  |     2 +-
 gnu/dist/toolchain/ld/emultempl/gld960.em                   |     2 +-
 gnu/dist/toolchain/ld/emultempl/gld960c.em                  |     2 +-
 gnu/dist/toolchain/ld/emultempl/hppaelf.em                  |     2 +-
 gnu/dist/toolchain/ld/emultempl/linux.em                    |     2 +-
 gnu/dist/toolchain/ld/emultempl/lnk960.em                   |     2 +-
 gnu/dist/toolchain/ld/emultempl/m68kcoff.em                 |     2 +-
 gnu/dist/toolchain/ld/emultempl/m68kelf.em                  |     2 +-
 gnu/dist/toolchain/ld/emultempl/mipsecoff.em                |     2 +-
 gnu/dist/toolchain/ld/emultempl/pe.em                       |     5 +-
 gnu/dist/toolchain/ld/emultempl/sunos.em                    |     2 +-
 gnu/dist/toolchain/ld/emultempl/vanilla.em                  |     2 +-
 gnu/dist/toolchain/ld/ld.1                                  |    21 +-
 gnu/dist/toolchain/ld/ld.info                               |   144 +-
 gnu/dist/toolchain/ld/ld.info-1                             |     4 +-
 gnu/dist/toolchain/ld/ld.info-2                             |    13 +-
 gnu/dist/toolchain/ld/ld.info-3                             |     2 +-
 gnu/dist/toolchain/ld/ld.info-4                             |     2 +-
 gnu/dist/toolchain/ld/ld.info-5                             |     2 +-
 gnu/dist/toolchain/ld/ld.info-6                             |     4 +-
 gnu/dist/toolchain/ld/ld.texinfo                            |   101 +-
 gnu/dist/toolchain/ld/ldcref.c                              |     2 +-
 gnu/dist/toolchain/ld/ldctor.c                              |     2 +-
 gnu/dist/toolchain/ld/ldctor.h                              |     3 +-
 gnu/dist/toolchain/ld/ldemul.c                              |     2 +-
 gnu/dist/toolchain/ld/ldemul.h                              |     2 +-
 gnu/dist/toolchain/ld/ldexp.c                               |     9 +-
 gnu/dist/toolchain/ld/ldexp.h                               |     3 +-
 gnu/dist/toolchain/ld/ldfile.c                              |    28 +-
 gnu/dist/toolchain/ld/ldfile.h                              |     3 +-
 gnu/dist/toolchain/ld/ldlang.c                              |   109 +-
 gnu/dist/toolchain/ld/ldlang.h                              |     3 +-
 gnu/dist/toolchain/ld/ldlex.h                               |     3 +-
 gnu/dist/toolchain/ld/ldlex.l                               |    19 +-
 gnu/dist/toolchain/ld/ldmain.h                              |     3 +-
 gnu/dist/toolchain/ld/ldmisc.c                              |    16 +-
 gnu/dist/toolchain/ld/ldmisc.h                              |     4 +-
 gnu/dist/toolchain/ld/ldver.c                               |     2 +-
 gnu/dist/toolchain/ld/ldver.h                               |     2 +-
 gnu/dist/toolchain/ld/ldver.texi                            |     2 +-
 gnu/dist/toolchain/ld/ldwrite.c                             |     2 +-
 gnu/dist/toolchain/ld/mpw-elfmips.c                         |     5 +-
 gnu/dist/toolchain/ld/mpw-eppcmac.c                         |     5 +-
 gnu/dist/toolchain/ld/mpw-esh.c                             |     2 +-
 gnu/dist/toolchain/ld/mpw-idtmips.c                         |     2 +-
 gnu/dist/toolchain/ld/mri.c                                 |     2 +-
 gnu/dist/toolchain/ld/mri.h                                 |     2 +-
 gnu/dist/toolchain/ld/pe-dll.c                              |     2 +-
 gnu/dist/toolchain/ld/pe-dll.h                              |     2 +-
 gnu/dist/toolchain/ld/po/POTFILES.in                        |     2 +-
 gnu/dist/toolchain/ld/sysdep.h                              |     2 +-
 gnu/dist/toolchain/ld/testsuite/ChangeLog                   |    61 +
 gnu/dist/toolchain/ld/testsuite/config/default.exp          |     3 +-
 gnu/dist/toolchain/ld/testsuite/ld-bootstrap/bootstrap.exp  |    26 +-
 gnu/dist/toolchain/ld/testsuite/ld-cdtest/cdtest.exp        |     2 +-
 gnu/dist/toolchain/ld/testsuite/ld-checks/checks.exp        |     7 +-
 gnu/dist/toolchain/ld/testsuite/ld-elfvers/vers.exp         |    11 +-
 gnu/dist/toolchain/ld/testsuite/ld-elfvsb/elfvsb.exp        |    24 +-
 gnu/dist/toolchain/ld/testsuite/ld-empic/empic.exp          |     2 +-
 gnu/dist/toolchain/ld/testsuite/ld-scripts/cross2.t         |     4 +-
 gnu/dist/toolchain/ld/testsuite/ld-scripts/crossref.exp     |    18 +-
 gnu/dist/toolchain/ld/testsuite/ld-scripts/defined.exp      |    16 +
 gnu/dist/toolchain/ld/testsuite/ld-scripts/phdrs.exp        |    23 +-
 gnu/dist/toolchain/ld/testsuite/ld-scripts/phdrs.t          |     4 +-
 gnu/dist/toolchain/ld/testsuite/ld-scripts/script.exp       |    16 +
 gnu/dist/toolchain/ld/testsuite/ld-scripts/sizeof.exp       |    16 +
 gnu/dist/toolchain/ld/testsuite/ld-scripts/weak.exp         |    16 +
 gnu/dist/toolchain/ld/testsuite/ld-selective/selective.exp  |    10 +-
 gnu/dist/toolchain/ld/testsuite/ld-sh/sh.exp                |     2 +-
 gnu/dist/toolchain/ld/testsuite/ld-shared/main.c            |     2 +
 gnu/dist/toolchain/ld/testsuite/ld-shared/shared.exp        |    31 +-
 gnu/dist/toolchain/ld/testsuite/ld-shared/symbolic.dat      |     8 +
 gnu/dist/toolchain/ld/testsuite/ld-srec/srec.exp            |    21 +-
 gnu/dist/toolchain/ld/testsuite/ld-undefined/undefined.exp  |    11 +-
 gnu/dist/toolchain/ld/testsuite/ld-undefined/weak-undef.exp |    16 +
 gnu/dist/toolchain/ld/testsuite/ld-versados/versados.exp    |     2 +-
 gnu/dist/toolchain/ld/testsuite/lib/ld-lib.exp              |    54 +-
 gnu/dist/toolchain/opcodes/hppa-dis.c                       |     2 +-
 gnu/dist/toolchain/opcodes/i386-dis.c                       |   258 +-
 gnu/dist/toolchain/opcodes/i960-dis.c                       |     3 +-
 gnu/dist/toolchain/opcodes/ia64-asmtab.c                    |   794 +-
 gnu/dist/toolchain/opcodes/ia64-asmtab.h                    |     2 +-
 gnu/dist/toolchain/opcodes/ia64-dis.c                       |     2 +-
 gnu/dist/toolchain/opcodes/ia64-gen.c                       |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc-a.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc-b.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc-f.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc-i.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc-m.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc-x.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc.c                       |     2 +-
 gnu/dist/toolchain/opcodes/ia64-opc.h                       |     2 +-
 gnu/dist/toolchain/opcodes/m10200-dis.c                     |     2 +-
 gnu/dist/toolchain/opcodes/m10200-opc.c                     |     2 +-
 gnu/dist/toolchain/opcodes/m10300-dis.c                     |     2 +-
 gnu/dist/toolchain/opcodes/m10300-opc.c                     |     2 +-
 gnu/dist/toolchain/opcodes/m32r-asm.c                       |     2 +-
 gnu/dist/toolchain/opcodes/m32r-desc.c                      |     2 +-
 gnu/dist/toolchain/opcodes/m32r-desc.h                      |     2 +-
 gnu/dist/toolchain/opcodes/m32r-dis.c                       |     2 +-
 gnu/dist/toolchain/opcodes/m32r-ibld.c                      |     2 +-
 gnu/dist/toolchain/opcodes/m32r-opc.c                       |     2 +-
 gnu/dist/toolchain/opcodes/m32r-opc.h                       |     2 +-
 gnu/dist/toolchain/opcodes/m32r-opinst.c                    |     2 +-
 gnu/dist/toolchain/opcodes/m68hc11-dis.c                    |     2 +-
 gnu/dist/toolchain/opcodes/m68k-dis.c                       |    38 +-
 gnu/dist/toolchain/opcodes/m68k-opc.c                       |   258 +-
 gnu/dist/toolchain/opcodes/m88k-dis.c                       |     2 +-
 gnu/dist/toolchain/opcodes/mcore-dis.c                      |     2 +-
 gnu/dist/toolchain/opcodes/mcore-opc.h                      |     2 +-
 gnu/dist/toolchain/opcodes/mips-dis.c                       |   371 +-
 gnu/dist/toolchain/opcodes/mips-opc.c                       |    19 +-
 gnu/dist/toolchain/opcodes/mips16-opc.c                     |     2 +-
 gnu/dist/toolchain/opcodes/ns32k-dis.c                      |     3 +-
 gnu/dist/toolchain/opcodes/opintl.h                         |     2 +-
 gnu/dist/toolchain/opcodes/pj-dis.c                         |     2 +-
 gnu/dist/toolchain/opcodes/pj-opc.c                         |     2 +-
 gnu/dist/toolchain/opcodes/po/POTFILES.in                   |    10 +-
 gnu/dist/toolchain/opcodes/ppc-dis.c                        |     2 +-
 gnu/dist/toolchain/opcodes/sh-dis.c                         |     2 +-
 gnu/dist/toolchain/opcodes/sh-opc.h                         |     3 +-
 gnu/dist/toolchain/opcodes/sparc-dis.c                      |     3 +-
 gnu/dist/toolchain/opcodes/sparc-opc.c                      |     3 +-
 gnu/dist/toolchain/opcodes/sysdep.h                         |     2 +-
 gnu/dist/toolchain/opcodes/tic30-dis.c                      |     2 +-
 gnu/dist/toolchain/opcodes/tic54x-dis.c                     |     2 +-
 gnu/dist/toolchain/opcodes/tic54x-opc.c                     |     2 +-
 gnu/dist/toolchain/opcodes/tic80-dis.c                      |     2 +-
 gnu/dist/toolchain/opcodes/tic80-opc.c                      |     2 +-
 gnu/dist/toolchain/opcodes/v850-dis.c                       |     2 +-
 gnu/dist/toolchain/opcodes/v850-opc.c                       |     2 +-
 gnu/dist/toolchain/opcodes/w65-dis.c                        |     2 +-
 gnu/dist/toolchain/opcodes/w65-opc.h                        |    25 +-
 gnu/dist/toolchain/opcodes/z8k-dis.c                        |     2 +-
 gnu/dist/toolchain/opcodes/z8kgen.c                         |    25 +-
 gnu/dist/toolchain/texinfo/texinfo.tex                      |  3728 +++++++---
 183 files changed, 5132 insertions(+), 3156 deletions(-)

diffs (truncated from 15021 to 300 lines):

diff -r 85b7fb597a7c -r 7f969d4b6350 gnu/dist/toolchain/gprof/ChangeLog
--- a/gnu/dist/toolchain/gprof/ChangeLog        Tue Aug 14 02:47:42 2001 +0000
+++ b/gnu/dist/toolchain/gprof/ChangeLog        Tue Aug 14 02:57:43 2001 +0000
@@ -1,3 +1,86 @@
+2001-06-11  Alan Modra  <amodra%bigpond.net.au@localhost>
+
+       Merge from mainline.
+       2001-05-16  Alexandre Oliva  <aoliva%redhat.com@localhost>
+       * gmon_io.c (gmon_io_read, gmon_io_write_vma,
+       gmon_io_write_32, gmon_io_write_8, gmon_io_write): Adjust
+       argument list for K&R C.
+
+       2001-03-13  David Mosberger  <davidm%hpl.hp.com@localhost>
+       * hist.c (hist_dimension): Declare as an array of 16 characters.
+       (hist_read_rec): If SAMPLEDEBUG, print each histogram bin count.
+       * basic_blocks.c: Whitespace and formatting changes.
+       * bb_exit_func.c: Ditto.
+       * call_graph.c: Ditto.
+       * call_graph.h: Ditto.
+       * cg_arcs.c: Ditto.
+       * cg_print.c: Ditto.
+       * cg_print.h: Ditto.
+       * corefile.c: Ditto.
+       * corefile.h: Ditto.
+       * gmon_io.c: Ditto.
+       * gmon_io.h: Ditto.
+       * gmon_out.h: Ditto.
+       * gprof.c: Ditto.
+       * hist.c: Ditto.
+       * hist.h: Ditto.
+       * i386.c: Ditto.
+       * search_list.c: Ditto.
+       * search_list.h: Ditto.
+       * source.c: Ditto.
+       * source.h: Ditto.
+       * sym_ids.c: Ditto.
+       * sym_ids.h: Ditto.
+       * symtab.c: Ditto.
+       * symtab.h: Ditto.
+       * tahoe.c: Ditto.
+       * utils.c: Ditto.
+       * vax.c: Ditto.
+       * gmon_out.h (gmon_hist_hdr): Delete.
+       (gmon_cg_arc_record): Delete.
+       * gmon_io.c (put_vma): Declare "static".
+       (get_vma): Ditto.
+       (gmon_io_write): New function.
+       (gmon_io_write_8): Ditto.
+       (gmon_io_write_32): Ditto.
+       (gmon_io_write_vma): Ditto.
+       (gmon_io_read): Ditto.
+       (gmon_io_read_32): Ditto.
+       (gmon_io_read_vma): Ditto.
+       * basic_blocks.c (bb_read_rec): Use gmon_io_read* / gmon_io_write*
+       to read/write data file in a more portable fashion.
+       (bb_write_blocks): Ditto.
+       * call_graph.c (cg_read_rec): Ditto.
+       (cg_write_arcs): Ditto.
+       * hist.c (hist_read_rec): Ditto.
+       (hist_write_hist): Ditto.
+       From Jes Sorensen  <jes%linuxcare.com@localhost>
+       * gmon_out.h: Use GMON_PTR_SIZE instead of sizeof(char*).
+       * gmon.h: Ditto.
+       * configure.in: Get GMON_PTR_SIZE from existing <sys/gmon_out.h>
+       if it exists.
+       * acconfig.h: New file. Mention and document GMON_PTR_SIZE.
+       * gconfig.h: Regenerate.
+       * configure: Regenerate.
+       * Makefile.in: Regenerate.
+
+       2001-02-27  Alan Modra  <alan%linuxcare.com.au@localhost>
+       * configure.in (BFD_VERSION): New.
+       (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+       * configure: Regenerate.
+       * gconfig.in: Regenerate.
+       * Makefile.am: Run "make dep-am"
+       * Makefile.in: Regenerate.
+
+2001-06-10  Philip Blundell  <philb%gnu.org@localhost>
+
+       * configure.in: Set version to 2.11.1.
+       * configure: Regenerate.
+
+2001-06-07  Alan Modra  <amodra%bigpond.net.au@localhost>
+
+       * Many files: Update copyright notices.
+
 2001-03-16  Philip Blundell  <philb%gnu.org@localhost>
 
        * configure: Regenerate.
@@ -67,8 +150,8 @@
 
 2000-07-05  Kenneth Block  <krblock%computer.org@localhost>
 
-        * gprof/gprof.c: Add optional style to demangle switch
-        * gprof/gprof.texi: Document optional style to demangle switch.
+        * gprof.c: Add optional style to demangle switch
+        * gprof.texi: Document optional style to demangle switch.
 
 2000-06-05  DJ Delorie  <dj%redhat.com@localhost>
 
@@ -1304,7 +1387,7 @@
           -S: annotate source file
           -t: set table length (with -S)
 
-       * Makefile (OBJS): added basic_blocks.o call_graph.o gmon_io.o
+       * Makefile.am (OBJS): added basic_blocks.o call_graph.o gmon_io.o
        source.o time_hist.o
 
        Fri Jul  1 15:23:50 1994  David Mosberger-Tang  (davidm%piston.cs.arizona.edu@localhost)
@@ -1455,7 +1538,7 @@
 
 Tue Apr 13 16:14:03 1993  Per Bothner  (bothner%cygnus.com@localhost)
 
-       * M Makefile.in:  Add -g to CFLAGS.
+       * Makefile.in:  Add -g to CFLAGS.
        Ads LDFLAGS and use in place of CFLAGS where appropriate.
        * configure.in:  Make a sysdep.hlink in the same way other
        bfd-based directories do.
diff -r 85b7fb597a7c -r 7f969d4b6350 gnu/dist/toolchain/gprof/acconfig.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gprof/acconfig.h       Tue Aug 14 02:57:43 2001 +0000
@@ -0,0 +1,2 @@
+/* Define as the size of a pointer in the target profile file format.  */
+#undef GMON_PTR_SIZE
diff -r 85b7fb597a7c -r 7f969d4b6350 gnu/dist/toolchain/gprof/basic_blocks.c
--- a/gnu/dist/toolchain/gprof/basic_blocks.c   Tue Aug 14 02:47:42 2001 +0000
+++ b/gnu/dist/toolchain/gprof/basic_blocks.c   Tue Aug 14 02:57:43 2001 +0000
@@ -2,7 +2,7 @@
    of basic-block info to/from gmon.out; computing and formatting of
    basic-block related statistics.
 
-   Copyright (C) 2000  Free Software Foundation, Inc.
+   Copyright 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -58,7 +58,7 @@
   if (left->file && right->file)
     {
       r = strcmp (left->file->name, right->file->name);
-      
+
       if (r)
        return r;
 
@@ -116,18 +116,17 @@
 DEFUN (bb_read_rec, (ifp, filename), FILE * ifp AND const char *filename)
 {
   int nblocks, b;
-  bfd_vma addr;
-  unsigned long ncalls;
+  bfd_vma addr, ncalls;
   Sym *sym;
 
-  if (fread (&nblocks, sizeof (nblocks), 1, ifp) != 1)
+  if (gmon_io_read_32 (ifp, &nblocks))
     {
-      fprintf (stderr, _("%s: %s: unexpected end of file\n"), whoami, filename);
+      fprintf (stderr, _("%s: %s: unexpected end of file\n"),
+              whoami, filename);
       done (1);
     }
 
   nblocks = bfd_get_32 (core_bfd, (bfd_byte *) & nblocks);
-  
   if (gmon_file_version == 0)
     fskip_string (ifp);
 
@@ -136,7 +135,7 @@
       if (gmon_file_version == 0)
        {
          int line_num;
-         
+
          /* Version 0 had lots of extra stuff that we don't
             care about anymore.  */
          if ((fread (&ncalls, sizeof (ncalls), 1, ifp) != 1)
@@ -149,24 +148,17 @@
              done (1);
            }
        }
-      else
+      else if (gmon_io_read_vma (ifp, &addr)
+              || gmon_io_read_vma (ifp, &ncalls))
        {
-         if (fread (&addr, sizeof (addr), 1, ifp) != 1
-             || fread (&ncalls, sizeof (ncalls), 1, ifp) != 1)
-           {
-             perror (filename);
-             done (1);
-           }
+         perror (filename);
+         done (1);
        }
 
       /* Basic-block execution counts are meaningful only if we're
-         profiling at the line-by-line level:  */
+        profiling at the line-by-line level:  */
       if (line_granularity)
        {
-         /* Convert from target to host endianness:  */
-         addr = get_vma (core_bfd, (bfd_byte *) & addr);
-         ncalls = bfd_get_32 (core_bfd, (bfd_byte *) &ncalls);
-
          sym = sym_lookup (&symtab, addr);
 
          if (sym)
@@ -176,7 +168,7 @@
              DBG (BBDEBUG,
                   printf ("[bb_read_rec] 0x%lx->0x%lx (%s:%d) cnt=%lu\n",
                           (unsigned long) addr, (unsigned long) sym->addr,
-                          sym->name, sym->line_num, ncalls));
+                          sym->name, sym->line_num, (unsigned long) ncalls));
 
              for (i = 0; i < NBBS; i++)
                {
@@ -211,10 +203,7 @@
 void
 DEFUN (bb_write_blocks, (ofp, filename), FILE * ofp AND const char *filename)
 {
-  const unsigned char tag = GMON_TAG_BB_COUNT;
   int nblocks = 0;
-  bfd_vma addr;
-  unsigned long ncalls;
   Sym *sym;
   int i;
 
@@ -227,9 +216,8 @@
     }
 
   /* Write header:  */
-  bfd_put_32 (core_bfd, nblocks, (bfd_byte *) & nblocks);
-  if (fwrite (&tag, sizeof (tag), 1, ofp) != 1
-      || fwrite (&nblocks, sizeof (nblocks), 1, ofp) != 1)
+  if (gmon_io_write_8 (ofp, GMON_TAG_BB_COUNT)
+      || gmon_io_write_32 (ofp, nblocks))
     {
       perror (filename);
       done (1);
@@ -240,11 +228,8 @@
     {
       for (i = 0; i < NBBS && sym->bb_addr[i]; i++)
        {
-         put_vma (core_bfd, sym->bb_addr[i], (bfd_byte *) & addr);
-         bfd_put_32 (core_bfd, sym->bb_calls[i], (bfd_byte *) & ncalls);
-
-         if (fwrite (&addr, sizeof (addr), 1, ofp) != 1
-             || fwrite (&ncalls, sizeof (ncalls), 1, ofp) != 1)
+         if (gmon_io_write_vma (ofp, sym->bb_addr[i])
+             || gmon_io_write_vma (ofp, sym->bb_calls[i]))
            {
              perror (filename);
              done (1);
@@ -255,8 +240,8 @@
 
 /* Output basic-block statistics in a format that is easily parseable.
    Current the format is:
-  
-        <filename>:<line-number>: (<function-name>:<bb-addr): <ncalls>  */
+
+       <filename>:<line-number>: (<function-name>:<bb-addr): <ncalls>  */
 
 void
 DEFUN_VOID (print_exec_counts)
@@ -272,12 +257,12 @@
   /* Sort basic-blocks according to function name and line number:  */
   sorted_bbs = (Sym **) xmalloc (symtab.len * sizeof (sorted_bbs[0]));
   len = 0;
-  
+
   for (sym = symtab.base; sym < symtab.limit; ++sym)
     {
       /* Accept symbol if it's in the INCL_EXEC table
-         or there is no INCL_EXEC table
-         and it does not appear in the EXCL_EXEC table.  */
+        or there is no INCL_EXEC table
+        and it does not appear in the EXCL_EXEC table.  */
       if (sym_lookup (&syms[INCL_EXEC], sym->addr)
          || (syms[INCL_EXEC].len == 0
              && !sym_lookup (&syms[EXCL_EXEC], sym->addr)))
@@ -285,7 +270,7 @@
          sorted_bbs[len++] = sym;
        }
     }
-  
+
   qsort (sorted_bbs, len, sizeof (sorted_bbs[0]), cmp_bb);
 
   /* Output basic-blocks:  */
@@ -299,7 +284,7 @@
                  sym->file ? sym->file->name : _("<unknown>"), sym->line_num,
                  sym->name, (unsigned long) sym->addr, sym->ncalls);
        }
-      
+
       for (j = 0; j < NBBS && sym->bb_addr[j]; j ++)
        {
          if (sym->bb_calls[j] > 0 || ! ignore_zeros)
@@ -318,7 +303,7 @@



Home | Main Index | Thread Index | Old Index