gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gprof / utils.c
index cf79fd6a9419d6f5382afab220fd874768746dd7..76bc57d31831994d696795b58cf5fb8e1cce51b3 100644 (file)
@@ -26,8 +26,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#include "demangle.h"
 #include "gprof.h"
+#include "demangle.h"
 #include "search_list.h"
 #include "source.h"
 #include "symtab.h"
@@ -58,7 +58,7 @@ print_name_only (Sym *self)
        }
       printf ("%s", name);
       size = strlen (name);
-      if (line_granularity && self->file)
+      if ((line_granularity || inline_file_names) && self->file)
        {
          filename = self->file->name;
          if (!print_path)
@@ -73,15 +73,19 @@ print_name_only (Sym *self)
                  filename = self->file->name;
                }
            }
-         sprintf (buf, " (%s:%d @ %lx)", filename, self->line_num,
-                  (unsigned long) self->addr);
+         if (line_granularity)
+           {
+             sprintf (buf, " (%s:%d @ %lx)", filename, self->line_num,
+                      (unsigned long) self->addr);
+           }
+         else
+           {
+             sprintf (buf, " (%s:%d)", filename, self->line_num);
+           }
          printf ("%s", buf);
          size += strlen (buf);
        }
-      if (demangled)
-       {
-         free (demangled);
-       }
+      free (demangled);
       DBG (DFNDEBUG, printf ("{%d} ", self->cg.top_order));
       DBG (PROPDEBUG, printf ("%4.0f%% ", 100.0 * self->cg.prop.fract));
     }
This page took 0.024765 seconds and 4 git commands to generate.