2 * Copyright (c) 1983, 1998, 2001 Regents of the University of California.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that: (1) source distributions retain this entire copyright
7 * notice and comment, and (2) distributions including binaries display
8 * the following acknowledgement: ``This product includes software
9 * developed by the University of California, Berkeley and its contributors''
10 * in the documentation or other materials provided with the distribution
11 * and in all advertising materials mentioning features or use of this
12 * software. Neither the name of the University nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 #include "search_list.h"
29 * Print name of symbol. Return number of characters printed.
32 print_name_only (self
)
35 const char *name
= self
->name
;
43 if (!bsd_style_output
)
45 if (name
[0] == '_' && name
[1] && discard_underscores
)
51 demangled
= cplus_demangle (name
, DMGL_ANSI
| DMGL_PARAMS
);
60 if (line_granularity
&& self
->file
)
62 filename
= self
->file
->name
;
65 filename
= strrchr (filename
, '/');
72 filename
= self
->file
->name
;
75 sprintf (buf
, " (%s:%d @ %lx)", filename
, self
->line_num
,
76 (unsigned long) self
->addr
);
84 DBG (DFNDEBUG
, printf ("{%d} ", self
->cg
.top_order
));
85 DBG (PROPDEBUG
, printf ("%4.0f%% ", 100.0 * self
->cg
.prop
.fract
));
95 print_name_only (self
);
97 if (self
->cg
.cyc
.num
!= 0)
99 printf (_(" <cycle %d>"), self
->cg
.cyc
.num
);
101 if (self
->cg
.index
!= 0)
103 if (self
->cg
.print_flag
)
105 printf (" [%d]", self
->cg
.index
);
109 printf (" (%d)", self
->cg
.index
);