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: [patch+doc 1/2] filename-display: 1->4 options {inferior,libs}{,-sepdebug}


On Wed, 06 Mar 2013 20:54:16 +0100, Doug Evans wrote:
> We have various parameters that together specify where to find separate debug info.
> Is it possible to piggyback on that?
> E.g., Something minimal for now like specifying which ones are
> displayed as relative with the default being none?
> [And thus by default everything with separate debug info will
> be displayed using absolute file names.]
> Or something like that.

It all comes from the problem both /usr/local and $HOME directories look the
same for GDB but they should behaves differentely.


Some 'where to find separate debug info' based decisions were proposed in:
	http://sourceware.org/ml/gdb-patches/2013-02/msg00123.html
	Message-ID: <20130205182245.GA19307@host2.jankratochvil.net>
such as:
	no sepdebug                     => relative filenames
	sepdebug in /usr/lib/debug      => absolute filenames
	sepdebug from .debug or .debug/ => relative filenames

That will work for your stated binary with sepdebug in $HOME (although I still
cannot imagine how that looks / why is it built that way).

But that will still not work for /usr/local/lib/mumble.so not using sepdebug
where absolute filenames are appropriate but GDB will use relative filenames.


> Oops.  I also meant to ask about executable-vs-library.
> IOW, the distinction between executables and shared libs in your patch.
> There's a 2x2 matrix of {executable,shared-lib} x {embedded-debug-info,separate-debug-info}.

I find shared libraries uncommon in $HOME so using
	set filename-display libraries absolute
will fix the /usr/local/lib/mumble.so problem while it will still keep
relative filenames for hello.c examples.  I did not intend to make the
"libraries absolute" setting a default but maybe we can.

That still will not fix /usr/local/bin/mumble problem where we would also like
absolute filenames.


There could be very many complicated settings, there could be done some
per-directory setting like there is 'set auto-load safe-path'.  But I find
that needlessly complicated, in fact I believe any experienced GDB user should
just do:
	echo >>~/.gdbinit set filename-display absolute
and be done with it.  Just I did not want to break first GDB experience with
hello.c example code by displaying absolute pathname for ~/hello.c.


Rather than those 2x2 settings personally I still prefer the former
	[patchv2 12/11] New options {relative,basename}-with-system-absolute
	http://sourceware.org/ml/gdb-patches/2013-01/msg00700.html
	Message-ID: <20130129221019.GA27463@host2.jankratochvil.net>
+
	[patchv2 13/11] Make relative-with-system-absolute the default
	http://sourceware.org/ml/gdb-patches/2013-01/msg00701.html
	Message-ID: <20130129221118.GB27463@host2.jankratochvil.net>

possibly just renaming it s/system/separate-debuginfo/.


Thanks,
Jan


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