This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patchv2] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)


> Date: Fri, 30 Nov 2012 19:56:53 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Eldar Gaynetdinov <hal9000ed2k@gmail.com>
> 
> starting a new thread, formerly it was:
> 	Re: [patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)
> 	Message-ID: <20120406142114.GA25129@host2.jankratochvil.net>
> 	http://sourceware.org/ml/gdb-patches/2012-04/msg00106.html

Thanks.

> +set backtrace filename-display basename|relative|absolute
> +show backtrace filename-display
> +  Control the way in which filenames is displayed in backtraces.
> +  The default remains unchanged ("relative").

The default cannot "remain" because this setting was not in GDB
before.  So 'The default is "relative".' is a better wording.

> +If backtraces aren't easy to read due to a long absolute filename record and
> +you just want to see only a basename or a relative filename,
> +you can change this behavior:

The current behavior, and the default one after this change, is to
show relative file names, so talking about long absolute file names is
confusing.  I would say something simpler, like

  You can control how file names are displayed in backtraces.

> +@itemx set backtrace filename-display relative
> +@cindex backtrace filename-display
> +Display a filename without the compilation directory part.

"A file name without the directory" can be easily be interpreted as
basename.  I suggest

  Display file names relative to the compilation directory.

> +@item show backtrace filename-display
> +Show the current way to display a filename in backtraces.
                                   ^^^^^^^^^^
"filenames", in plural.

The documentation parts are OK with these changes.

> +  add_setshow_enum_cmd ("filename-display", class_obscure,
> +			filename_display_kind_names,
> +			&filename_display_string, _("\
> +Set how to display filenames in backtraces."), _("\
> +Show how to display filenames in backtraces."), _("\
> +filename-display can be:\n\
> +  basename       - display only basename of a filename\n\
> +  relative       - display a filename without the compilation directory part\n\

Here, too, I'd say "relative to the compilation directory."

> +  absolute       - display an absolute filename\n\
> +By default, as-recorded filename is displayed."),

The last sentence seems to imply that the default is different from
"relative", and once changed to something else, cannot be restored,
since none of the settings is the default.  But the truth is that the
default is "relative", right?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]