* 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"
#include "cg_arcs.h"
#include "utils.h"
+#include "corefile.h"
/*
if (name)
{
- if (!bsd_style_output)
+ if (!bsd_style_output && demangle)
{
- if (name[0] == '_' && name[1] && discard_underscores)
- {
- name++;
- }
- if (demangle)
- {
- demangled = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS);
- if (demangled)
- {
- name = demangled;
- }
- }
+ demangled = bfd_demangle (core_bfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (demangled)
+ name = demangled;
}
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)
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);
}