* as.c (main): Call dwarf2_finish.
[deliverable/binutils-gdb.git] / gprof / tahoe.c
index a9585df2a73315ac901f94f292767933dca5be2f..5981bc5278bbca9fde1d7f17f2d3048861e826fb 100644 (file)
@@ -18,7 +18,7 @@
  */
 #include "gprof.h"
 #include "cg_arcs.h"
-#include "core.h"
+#include "corefile.h"
 #include "hist.h"
 #include "symtab.h"
 
@@ -202,11 +202,11 @@ tahoe_reladdr (modep)
     case byterel:
       return (bfd_vma) (cp + sizeof *cp + *cp);
     case wordrel:
-      for (i = 0; i < sizeof *sp; i++)
+      for (i = 0; (size_t) i < sizeof *sp; i++)
        value = (value << 8) + (cp[i] & 0xff);
       return (bfd_vma) (cp + sizeof *sp + value);
     case longrel:
-      for (i = 0; i < sizeof *lp; i++)
+      for (i = 0; (size_t) i < sizeof *lp; i++)
        value = (value << 8) + (cp[i] & 0xff);
       return (bfd_vma) (cp + sizeof *lp + value);
     }
@@ -247,7 +247,8 @@ tahoe_find_call (parent, p_lowpc, p_highpc)
       p_highpc = s_highpc;
     }
   DBG (CALLDEBUG, printf ("[findcall] %s: 0x%lx to 0x%lx\n",
-                         parent->name, p_lowpc, p_highpc));
+                         parent->name, (unsigned long) p_lowpc,
+                         (unsigned long) p_highpc));
   for (instructp = (unsigned char *) core_text_space + p_lowpc;
        instructp < (unsigned char *) core_text_space + p_highpc;
        instructp += length)
@@ -259,8 +260,10 @@ tahoe_find_call (parent, p_lowpc, p_highpc)
           *    maybe a callf, better check it out.
           *      skip the count of the number of arguments.
           */
-         DBG (CALLDEBUG, printf ("[findcall]\t0x%x:callf",
-                                 instructp - (unsigned char *) core_text_space));
+         DBG (CALLDEBUG, printf ("[findcall]\t0x%lx:callf",
+                                 ((unsigned long)
+                                  (instructp
+                                   - (unsigned char *) core_text_space))));
          firstmode = tahoe_operandmode (instructp + length);
          switch (firstmode)
            {
@@ -293,7 +296,7 @@ tahoe_find_call (parent, p_lowpc, p_highpc)
               *      [are there others that we miss?,
               *       e.g. arrays of pointers to functions???]
               */
-             arc_add (parent, &indirectchild, (long) 0);
+             arc_add (parent, &indirectchild, (unsigned long) 0);
              length += tahoe_operandlength (instructp + length);
              continue;
            case byterel:
@@ -310,16 +313,18 @@ tahoe_find_call (parent, p_lowpc, p_highpc)
                {
                  child = sym_lookup (&symtab, destpc);
                  DBG (CALLDEBUG,
-                      printf ("[findcall]\tdestpc 0x%lx", destpc);
+                      printf ("[findcall]\tdestpc 0x%lx",
+                              (unsigned long) destpc);
                       printf (" child->name %s", child->name);
-                      printf (" child->addr 0x%lx\n", child->addr);
+                      printf (" child->addr 0x%lx\n",
+                              (unsigned long) child->addr);
                    );
                  if (child->addr == destpc)
                    {
                      /*
                       *    a hit
                       */
-                     arc_add (parent, child, (long) 0);
+                     arc_add (parent, child, (unsigned long) 0);
                      length += tahoe_operandlength (instructp + length);
                      continue;
                    }
This page took 0.026593 seconds and 4 git commands to generate.