bfd:
[deliverable/binutils-gdb.git] / gprof / gprof.c
index dc6b618fdfd437155a7f742b8b2c07c84d9709c0..98406e67d3c31930c056b2c4c2060b3233b43565 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "libiberty.h"
 #include "gprof.h"
+#include "bfdver.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
@@ -170,7 +171,7 @@ Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n\
        [--demangle[=STYLE]] [--no-demangle] [@FILE]\n\
        [image-file] [profile-file...]\n"),
           whoami);
-  if (status == 0)
+  if (REPORT_BUGS_TO[0] && status == 0)
     fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
   done (status);
 }
@@ -200,7 +201,7 @@ main (int argc, char **argv)
   expandargv (&argc, &argv);
 
   while ((ch = getopt_long (argc, argv,
-       "aA::bBcCd::De:E:f:F:hiI:J::k:lLm:n::N::O:p::P::q::Q::st:Tvw:xyzZ::",
+       "aA::bBcC::d::De:E:f:F:hiI:J::k:lLm:n:N:O:p::P::q::Q::rR:st:Tvw:xyzZ::",
                            long_options, 0))
         != EOF)
     {
@@ -411,7 +412,7 @@ main (int argc, char **argv)
          break;
        case 'v':
          /* This output is intended to follow the GNU standards document.  */
-         printf (_("GNU gprof %s\n"), VERSION);
+         printf (_("GNU gprof %s\n"), BFD_VERSION_STRING);
          printf (_("Based on BSD gprof, copyright 1983 Regents of the University of California.\n"));
          printf (_("\
 This program is free software.  This program has absolutely no warranty.\n"));
@@ -545,7 +546,12 @@ This program is free software.  This program has absolutely no warranty.\n"));
   if (output_style == 0)
     {
       if (gmon_input & (INPUT_HISTOGRAM | INPUT_CALL_GRAPH))
-       output_style = STYLE_FLAT_PROFILE | STYLE_CALL_GRAPH;
+       {
+         if (gmon_input & INPUT_HISTOGRAM)
+           output_style |= STYLE_FLAT_PROFILE;
+         if (gmon_input & INPUT_CALL_GRAPH)
+           output_style |= STYLE_CALL_GRAPH;
+       }
       else
        output_style = STYLE_EXEC_COUNTS;
 
This page took 0.035175 seconds and 4 git commands to generate.