mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
* gprof.c (inline_file_names): New variable.
(OPTION_INLINE_FILE_NAMES): Define. (long_options): Add --inline-file-names. (usage): Likewise. (main): Process --inline-file-names. * gprof.h: Add prototype for inline_file_names. * utils.c (print_name_only): Handle inline_file_names. * gprof.texi: Document new command line option.
This commit is contained in:

committed by
Nick Clifton

parent
97122a4cff
commit
630b051036
@ -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,8 +73,15 @@ 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user