2001-11-06 Fred Fish <fnf@redhat.com>
[deliverable/binutils-gdb.git] / gprof / tahoe.c
index d133c1779506445915442022c9ec0d03a375c764..f9f72c0ad58a9b4a717819d9f09252092f399d79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (c) 1983, 2001 Regents of the University of California.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
@@ -46,6 +46,11 @@ typedef enum tahoe_opermodes tahoe_operandenum;
  */
 Sym indirectchild;
 
+tahoe_operandenum tahoe_operandmode PARAMS ((unsigned char *));
+char *tahoe_operandname PARAMS ((tahoe_operandenum));
+long tahoe_operandlength PARAMS ((unsigned char *));
+bfd_vma tahoe_reladdr PARAMS ((char *));
+void tahoe_find_call PARAMS ((Sym *, bfd_vma, bfd_vma));
 
 tahoe_operandenum
 tahoe_operandmode (modep)
@@ -247,7 +252,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 +265,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)
            {
@@ -301,7 +309,7 @@ tahoe_find_call (parent, p_lowpc, p_highpc)
            case longrel:
              /*
               *    regular pc relative addressing
-              *      check that this is the address of 
+              *      check that this is the address of
               *      a function.
               */
              destpc = tahoe_reladdr (instructp + length)
@@ -310,9 +318,11 @@ 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)
                    {
This page took 0.023664 seconds and 4 git commands to generate.